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

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

@callback 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.