Maestro v0.1.2 Maestro.Types.Snapshot View Source

Maestro.Aggregate.Roots can commit state that has been computed from events.

Roots can commit state that has been computed from the application of events. This is useful if events are expensive to apply or if there are a sufficiently large number of events that replaying from sequence=1 would be impractical.

With Maestro.Types.Events, :body is the necessary information to apply the event. In the case of Snapshots, the body is the actual computed state of the entity.

Link to this section Summary

Link to this section Types

Link to this type aggregate_id() View Source
aggregate_id() :: HLClock.Timestamp.t()
Link to this type sequence() View Source
sequence() :: integer()
Link to this type t() View Source
t() :: %Maestro.Types.Snapshot{
  __meta__: term(),
  aggregate_id: aggregate_id(),
  body: map(),
  sequence: sequence()
}