greyhound v0.1.0 Greyhound.Middleware behaviour

Middleware is reponsible for processing dispatched events.

All event processing is handled by middleware. This allows Greyhound to provide a minimal event bus implementation while providing support for more complex event processing workflows.

See Greyhound.Middleware.Dispatch.Local for an example.

Link to this section Summary

Callbacks

Process an event

Link to this section Callbacks

Link to this callback call(event, opts)
call(event :: Greyhound.Event.t(), opts :: list()) :: :ok

Process an event.

Receives a %Greyhound.Event{} struct as the first argument. The list of options provided when the bus was started is passed as the second argument.