Cizen.EffectHandler (Cizen v0.18.1) View Source

Handles effects.

Link to this section Summary

Link to this section Types

Specs

resolve() :: {:resolve, term(), state()}

Specs

state() :: %{
  handler: Cizen.SagaID.t(),
  effect: Cizen.Effect.t() | nil,
  effect_state: term(),
  event_buffer: [Cizen.Event.t()]
}

Link to this section Functions

Link to this function

feed_event(state, event)

View Source

Specs

feed_event(state(), Cizen.Event.t()) :: resolve() | state()

Specs

init(Cizen.SagaID.t()) :: state()
Link to this function

perform_effect(state, effect)

View Source

Specs

perform_effect(state(), Cizen.Effect.t()) :: resolve() | state()