# `Pkcs11ex.Audit.Storage.InMemory`
[🔗](https://github.com/utaladriz/pkcs11ex/blob/v0.1.0/lib/pkcs11ex/audit/storage/in_memory.ex#L1)

In-memory audit log storage. Agent-backed; serializes appends through
the agent's mailbox.

> #### Not durable {: .warning}
>
> Suitable for tests, scripts, and one-off introspection. Production
> deployments should plug a durable adapter (Postgres, SQLite,
> append-only file with fsync, etc.).

Start one Agent per audit log:

    {:ok, _} = Pkcs11ex.Audit.Storage.InMemory.start_link(name: :my_log)
    audit = Pkcs11ex.Audit.new(Pkcs11ex.Audit.Storage.InMemory, :my_log)
    {:ok, _entry} = Pkcs11ex.Audit.append(audit, %{...})

# `__overwrite_for_test__`

**Test-only** — direct mutation of an entry already in the store.
Used by chain-tamper-detection tests. Production code never calls this.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

---

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