# `ExGAM.Ledger.Store.ETS`
[🔗](https://github.com/elchemista/ex_gam/blob/0.1.0/lib/ex_gam/ledger/store/ets.ex#L1)

Volatile ETS Store for Domain ledgers.

One GenServer owns a protected ETS table and serializes compare-and-swap
transitions. A batch becomes acknowledged only in the same callback that
installs every linked Entry and its idempotency index. This adapter is
intended for development, tests, and ephemeral Domains; it makes no
durability claim across owner-process failure.

Cursors, Entries and batch identities occupy separate rows. Appending or
looking up an identity never copies prior history onto the owner's heap;
only load/export reconstruct a complete snapshot. One ETS insert publishes
the new Entries, cursor and batch identity together.

`:compressed` (default `false`) trades per-row encoding/decoding work for a
smaller table. It does not change batch visibility or durability guarantees.

`:fault_injection` (or `:fault`) may be set to `:before_commit` or
`:after_commit`. Both return `{:error, :ambiguous}`; the latter installs the
batch first, allowing recovery code to exercise identity lookup.

# `append_context`

```elixir
@type append_context() :: %{
  revision: non_neg_integer(),
  head_digest: ExGAM.Ledger.Entry.digest(),
  batches: %{optional(String.t()) =&gt; ExGAM.Ledger.batch_info()}
}
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

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

Starts an empty volatile ledger Store.

---

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