engine v0.1.2 Engine.Storage.Eventstore

Interface with the Extreme EventStore driver to save and read to EVENTSTORE. Note that the Engine supervisor starts the driver naming it as ‘EventStore’. iex> Engine.EventStore.save_event(“people”,%Obligation.Event.MoneyDeposited{}) This Eventstore interface is intelligent when saving snapshots

Summary

Functions

Save a list of events to the stream

Save snapshot after checking the frequency config, adding -snapshot to its namespace

Load all events for that stream

Load events, but from a specific position

Load the last snapshot for that stream

Functions

append_events(stream, events)

Save a list of events to the stream.

append_snapshot(stream, state, period \\ 50)

Save snapshot after checking the frequency config, adding -snapshot to its namespace

load_all_events(stream)

Load all events for that stream

load_events(stream, position)

Load events, but from a specific position

load_snapshot(stream)

Load the last snapshot for that stream

make_alias(name)