X3m.System.Aggregate.State (X3m System v0.9.1)

Copy Markdown View Source

The wrapper state of an aggregate: your aggregate's own state (client_state) plus its event-stream version and the set of already-processed message ids.

You meet it mostly in tests — X3m.System.Aggregate.initial_state/1 returns it and apply_events/3 produces it — where you read client_state to assert on your aggregate's state.

Summary

Types

t()

@type t() :: %X3m.System.Aggregate.State{
  client_state: any(),
  processed_messages: term(),
  version: integer()
}