package event
type Executable interface {
RunEvent(ev AnnotatedEvent)
}
// ExecutableFunc implements the Executable interface as a function,
// similar to how the std-lib http HandlerFunc implements a Handler.
// This can be used for small in-place executables, test helpers, etc.
type ExecutableFunc func(ev AnnotatedEvent)
func (fn ExecutableFunc) RunEvent(ev AnnotatedEvent) {
fn(ev)
}
type Executor interface {
Add(d Executable, opts *ExecutorOpts) (leaveExecutor func())
Enqueue(ev AnnotatedEvent) error
}
-
protolambda authored
* op-node: event-system with tracing * op-node: fix global synchronous events queue execution * op-node: bump rate limits on action tests * op-node: add missing read-lock to synchronous event executor * op-node: automatically attach emitters to derivers that need one
029fb1cc