# `AttestoClient.AuthorizationTransaction.Store.ETS`
[🔗](https://github.com/XukuLLC/attesto_client/blob/v2.26.0/lib/attesto_client/authorization_transaction/store/ets.ex#L1)

Single-node authorization transaction store backed by a private ETS table.

Start it under your application's supervisor and pass
`{AttestoClient.AuthorizationTransaction.Store.ETS, pid}` to `AttestoClient.AuthorizationCode.start/2`
and `AttestoClient.AuthorizationCode.callback/3`. The owning GenServer
serializes insert and consume operations, providing atomic single-use state.
Entries expire against monotonic time and are removed lazily on access.

At `:max_entries`, a new transaction evicts the oldest live transaction and
emits `[:attesto_client, :authorization_transaction, :evicted]` with
`%{count: 1}` and `%{reason: :capacity}`. This keeps unauthenticated login
starts from pinning the store at capacity. Applications must still rate-limit
their login-start endpoint because sustained churn can evict an in-flight
transaction.

This implementation is intentionally not distributed. Use a database or
distributed cache adapter implementing
`AttestoClient.AuthorizationTransaction.Store` when callbacks can reach
different nodes.

# `option`

```elixir
@type option() :: GenServer.option() | {:max_entries, pos_integer()}
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

```elixir
@spec start_link([option()]) :: GenServer.on_start()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
