MessageStore (message_store v3.1.0) View Source

A module for interactions with message store

Link to this section Summary

Link to this section Functions

Specs

category(String.t() | nil) :: String.t()
Link to this function

expected_version(message_store, stream_uuid)

View Source

Specs

expected_version(atom(), String.t()) :: Result.t(term(), integer())
Link to this function

fetch(conn, stream_name, projection, opts)

View Source

Specs

fetch(
  conn,
  String.t(),
  m,
  read:
    (conn, String.t(), list() ->
       Result.t(reason, [EventStore.RecordedEvent.t()])),
  project: ([EventStore.RecordedEvent.t()], m -> projection)
) :: Result.t(reason, projection)
when conn: module(), m: module(), reason: term(), projection: any()
Link to this function

project(messages, projection)

View Source

Specs

project([EventStore.RecordedEvent.t()], module()) :: any()
Link to this function

stream_name_to_id(stream_name)

View Source

Specs

stream_name_to_id(String.t()) :: String.t() | nil

Specs

to_result(:ok | {:error, err}, value) :: Result.t(err, value)
when err: any(), value: any()