RequestSeal.Replay.ETS (RequestSeal v0.2.0)

Copy Markdown View Source

Local atomic replay store owned by a caller-supervised GenServer.

start_link/1 requires max_entries: 1..10_000_000. The protected ETS table contains a reserved counter and namespace/key entries. Only this adapter may mutate it. Claims and explicit sweeps are serialized by its owner, preventing delete/insert races and enforcing an exact capacity. Duplicate claims never refresh retention. Owner termination loses all claims; this is not a durable or distributed store. Importing the module starts nothing. Multi-node operators sweep at now - max_internode_skew to preserve claims while any verifier still accepts the authenticated input. One namespace should use one freshness bound because duplicates never extend retention.

Summary

Functions

Returns a specification to start this module under a supervisor.

Start a local store under caller supervision.

Reference an existing caller-owned store.

Explicitly evict claims whose exclusive retention end is at or before now.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(arg1)

Start a local store under caller supervision.

store(pid)

@spec store(pid()) :: RequestSeal.Replay.Store.t()

Reference an existing caller-owned store.

sweep(pid, now)

Explicitly evict claims whose exclusive retention end is at or before now.