Cizen v0.10.0 Cizen.SagaFilter behaviour View Source
A behaviour module to define an event filter.
Link to this section Summary
Functions
Defines a event body filter
Link to this section Types
Link to this section Functions
Defines a event body filter.
Example
defmodule SomeSaga do
defstruct [:key, :value]
import Cizen.SagaFilter
defsagafilter KeyFilter, :key
defsagafilter ValueFilter, :value do
@moduledoc "Some document"
end
@behaviour Cizen.Saga
defstruct []
@impl true
def init(_id, _saga) do
:ok
end
@impl true
def handle_event(_id, _event, state) do
state
end
end
Link to this function
test(filter, event_body)
View Source
test(Cizen.SagaFilter.t(), Cizen.Saga.t()) :: boolean()