ETS-buffered JSONL session store.
Hot-path appends go to an in-memory ETS table keyed by monotonic
time so writes never block the loop. A background process flushes
buffered events to JSONL files every 250ms (or immediately when
forced via flush/1).
Path: <root>/<session_id>.jsonl. root defaults to
<cwd>/.exathena/sessions/; configurable via the :root option
passed to start_link/1.
Each JSONL line is one event: {"ts": "...", "event": "...", "data": {...}, "uuid": "..."}.
Summary
Functions
Returns a specification to start this module under a supervisor.
Force a synchronous flush (for tests + clean shutdown).
Resolved storage path for a session id (for tests + tooling).
Test helper: clear all buffered events + storage root.
Options
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec flush(GenServer.server()) :: :ok
Force a synchronous flush (for tests + clean shutdown).
Resolved storage path for a session id (for tests + tooling).
@spec reset(String.t() | nil) :: :ok
Test helper: clear all buffered events + storage root.
@spec start_link(keyword()) :: GenServer.on_start()
Options:
:root(default:Path.join(File.cwd!(), ".exathena/sessions")):flush_interval_ms(default 250).:name(default__MODULE__).