Maestro v0.3.0 Maestro.Types.Event View Source
Events are the key component from which state changes are made and projections can be built.
In order to ensure consistent application of events, they are always retrieved in order by sequence number. Additionally, events with conflicting sequence numbers will be rejected, and the aggregate can retry the command that generated the events that were committed second.
Link to this section Summary
Functions
Ensure that events are well formed and that sequence conflicts surface properly when attempting to commit them to the log.
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.Event{
__meta__: term(),
aggregate_id: aggregate_id(),
body: map(),
sequence: sequence(),
timestamp: HLClock.Timestamp.t(),
type: String.t()
}
t() :: %Maestro.Types.Event{ __meta__: term(), aggregate_id: aggregate_id(), body: map(), sequence: sequence(), timestamp: HLClock.Timestamp.t(), type: String.t() }
Link to this section Functions
Link to this function
changeset(e) View Source
Ensure that events are well formed and that sequence conflicts surface properly when attempting to commit them to the log.