workflow v0.2.0 Workflow.Adapter behaviour
Implement this functions below to add a new data storage for your events and snapshots. The persistence modules will retreive a pure list of events, ready for replay, instead of dealing with localized messages. It’s an adapter responsability to filter and answer only the necessary data to be used inside Commanded
Summary
Types
Callbacks
append_to_stream(stream_id, expected_version, event_data)
append_to_stream(stream_id, expected_version, event_data) :: :ok | {:error, reason}
Load a list of events from an specific position
read_stream_forward(stream_id, start_version, read_event_batch_size)
read_stream_forward(stream_id, start_version, read_event_batch_size) :: {:ok, batch} | {:error, reason}
Load a batch of events from storage