Maestro v0.3.0 Maestro.Types.Snapshot View Source
Maestro.Aggregate.Root
s 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.Event
s, :body
is the necessary information to apply the
event. In the case of Snapshot
s, 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()
View Source
aggregate_id() :: HLClock.Timestamp.t()
aggregate_id() :: HLClock.Timestamp.t()
Link to this type
sequence()
View Source
sequence()
View Source
sequence() :: integer()
sequence() :: integer()
Link to this type
t()
View Source
t()
View Source
t() :: %Maestro.Types.Snapshot{
__meta__: term(),
aggregate_id: aggregate_id(),
body: map(),
sequence: sequence()
}
t() :: %Maestro.Types.Snapshot{ __meta__: term(), aggregate_id: aggregate_id(), body: map(), sequence: sequence() }