ASM.Extensions.Persistence.FileStore (ASM v0.9.2)

Copy Markdown View Source

Durable append-only event store backed by a local file.

Events are persisted as Base64-encoded Erlang terms (one line per event) and reconstructed on startup for replay/rebuild operations.

Summary

Functions

Returns a specification to start this module under a supervisor.

Types

event_queue()

@type event_queue() :: :queue.queue(ASM.Event.t())

t()

@type t() :: %ASM.Extensions.Persistence.FileStore{
  by_session: %{optional(String.t()) => event_queue()},
  by_session_event_ids: %{optional(String.t()) => MapSet.t(String.t())},
  events: event_queue(),
  path: String.t(),
  seen_event_ids: MapSet.t(String.t()),
  sync_writes: boolean()
}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)

@spec start_link(keyword()) :: GenServer.on_start()