View Source Mobius.EventLog (mobius v0.6.1)

API for working with the event log

Summary

Types

Options to query the event log

Functions

Turn a list of Events into a binary

List the events in the event log

Parse the Mobius binary formatted event log

Save the current state of the event log to disk

Return the event log in the Mobius binary format

Types

@type opt() :: {:from, integer()} | {:to, integer()} | {:instance, Mobius.instance()}

Options to query the event log

Functions

Link to this function

events_to_binary(events)

View Source
@spec events_to_binary([Mobius.Event.t()]) :: binary()

Turn a list of Events into a binary

@spec list([opt()]) :: [Mobius.Event.t()]

List the events in the event log

@spec parse(binary()) :: {:ok, [Mobius.Event.t()]} | {:error, atom()}

Parse the Mobius binary formatted event log

@spec save([opt()]) :: :ok

Save the current state of the event log to disk

@spec to_binary([opt()]) :: binary()

Return the event log in the Mobius binary format