Disco v0.1.3 Disco.EventStore View Source
The event store.
This module is responsible to manage events so that they can be persisted and then retrieved.
The actual implementation uses PostgreSQL and Ecto.SQL
to store events. An adapter based
approach has been planned as one of the next planned features.
Link to this section Summary
Functions
Adds an event to the store
Returns the offset of an event consumer
List events for a given aggregate id
List events for a given set of event types
List events after a given offset
Reset the offset of a given event consumer
Updates the offset of an event consumer
Link to this section Types
Link to this section Functions
Adds an event to the store.
Returns the offset of an event consumer.
List events for a given aggregate id.
If offset is not present (nil), events will start from the beginning.
List events for a given set of event types.
List events after a given offset.
If offset is not present (nil), events will start from the beginning.
Reset the offset of a given event consumer.
Useful when you want a consumer to re-process all the events.
Updates the offset of an event consumer.
This function is usually called after an event has been processed.