Incident.EventHandler behaviour (incident v0.6.1) View Source

Defines the API for an Event Handler.

Link to this section Summary

Callbacks

Listens to a persisted event and an aggregate state. You can use the aggregate to apply the persisted event and its state to get a new state, and to project new data into the projection store.

Link to this section Callbacks

Specs

listen(struct(), map()) :: {:ok | :error, map()}

Listens to a persisted event and an aggregate state. You can use the aggregate to apply the persisted event and its state to get a new state, and to project new data into the projection store.