# `Attesto.CIBAStore.ETS`
[🔗](https://github.com/XukuLLC/attesto/blob/v1.3.0/lib/attesto/ciba_store/ets.ex#L1)

Single-node ETS implementation of `Attesto.CIBAStore`.

Authentication-request records live in an ETS table owned by a `GenServer`.
The state-changing callbacks (`approve/3`, `deny/2`, `poll/2`, `consume/2`)
run inside `GenServer.call/2`, so they are serialized through the owner
process - that is how this reference store gets the atomic, single-winner
state transitions `Attesto.CIBAStore` requires (a production multi-node
deployment uses an Ecto store, whose transitions are single conditional
`UPDATE ... RETURNING` statements). Reads that do not transition state
(`lookup/1`) hit the table directly.

## Start options

  * `:sweep_interval_ms` (default `30_000`) - how often expired rows are
    bulk-deleted. Correctness does not depend on sweeping (`redeem/4`
    re-checks expiry); the sweeper only bounds table size.

## Wiring

    children = [Attesto.CIBAStore.ETS]

# `start_link`

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

---

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