Maestro v0.3.0 Maestro.Aggregate.EventHandler behaviour View Source
Minimal behaviour for a proper event handler. Like the CommandHandler
, the
use of the behaviour is not strictly required.
Link to this section Summary
Callbacks
Event handlers must succeed in their application of the event.
Validation and other forms of rejection/failure should be done in the command
handler. This is made evident in the spec for apply
in that the result
should always be a new valid state.
Link to this section Types
Link to this type
event()
View Source
event()
View Source
event() :: Maestro.Types.Event.t()
event() :: Maestro.Types.Event.t()
Link to this section Callbacks
Link to this callback
apply(any, event) View Source
Event handlers must succeed in their application of the event.
Validation and other forms of rejection/failure should be done in the command
handler. This is made evident in the spec for apply
in that the result
should always be a new valid state.