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

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

Functions

delete_stream(stream, hard_delete \\ false)

delete a stream

read_event_backward(stream)

create a message to read the last event/snapshot only.

read_events(stream)

create a message to read all events for a stream

read_events(stream, position)

create a message to read events from a specific position

write_events(stream, events)

create a write message for a list of events