engine v0.1.2 Engine.Messages
Eventstore database use PROTOBUF, that is a compressed binary protocol. So all our communication with Eventstore is through messaging. Here we create this messages to send afterwards them to Hey, only! the store.ex is using this API. This is the most ‘low level’ communication with the ES Eventstore. Example: events = [%PersonCreated{name: “Pera Peric”}, %PersonChangedName{name: “Zika”}] Common.Factory.write_events(“people”, events) Note that it will first create_event for every event in the list of events.
Summary
Functions
delete a stream
create a message to read the last event/snapshot only
create a message to read all events for a stream
create a message to read events from a specific position
create a write message for a list of events