Attesto.CodeStore.ETS (Attesto v2.28.0)

Copy Markdown View Source

Single-node implementation of Attesto.CodeStore.

A GenServer serializes every transition over a protected ETS table. Reads also use that process so a bulk cut-off is observed atomically. All states retain immutable grant bindings. Claims have a fixed 300-second reservation; cleanup then requires code and linked access-token expiry. Redeemed records live through their recorded refresh-family and access-token lifetimes. An unbounded refresh-family record stays for the store's lifetime.

Supervise this module and pass it to Attesto.AuthorizationCode. Multiple nodes require a shared store. :sweep_interval_ms defaults to 30,000; cleanup is only for retention, and core always checks authorization-code expiry.

Summary

Functions

Clear every entry. Test-facing.

Functions

reset()

@spec reset() :: :ok

Clear every entry. Test-facing.

start_link(opts \\ [])

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