Modules
Durable single-node session host over req_managed_agents.
Resolved, validated host configuration. The struct threaded through the host; not raw opts.
Durable external_id -> upstream identity map over a Store. Reads and writes
Locator.Record rows; translates the store's :miss (and any non-Record
value found in a shared store) to the caller-facing :error.
Durable session-locator row: external id -> upstream identity. A pointer, not an event ledger.
Per-external-id GenServer driving one turn at a time through ReqManagedAgents.Session.run/2.
DynamicSupervisor holding one live SessionServer per external id. Crash-isolated:
killing one server never affects a sibling. start_or_get/2 is the sole entry point —
it starts a fresh server or hands back the pid of one already registered under the same
external id, resolving the race where two callers both call it concurrently for the same id.
Pluggable persistence for the session Locator. Mirrors RMA's Provisioner.Store
ETS/File pattern one layer up: live-session locator rows, not provisioning digests.
A store is referenced as {module(), keyword()}; ref/1 resolves the opts to the
concrete handle the other callbacks take.
File-backed Store implementation using OTP's :dets. The table is
reopened from the same path on every start_link/1, so locator rows
survive a BEAM restart. A corrupt or unreadable file is logged and
replaced with a fresh, empty table (mirrors RMA's Provisioner.Store.File
corrupt-file handling) — a lost locator row just means the next lookup
falls back to provisioning, not a crash.
Default Store implementation: a named public ETS :set table, owned by a
tiny GenServer so the table outlives any individual caller. Process-local —
empty in every fresh OS process, gone when the owner stops.