# `Spectre.Journal.Store`
[🔗](https://github.com/elchemista/spectre/blob/0.4.0/lib/spectre/journal/store.ex#L1)

Storage boundary for structured Spectre journal records.

A runtime store only needs to append records. Querying, retention, indexing,
and transactional outboxes remain application concerns. Adapters used by
configured Instance erasure additionally expose the optional, idempotent
`erase_instance/2` callback.

# `config`

```elixir
@type config() :: module() | {module(), keyword()} | keyword() | false | nil
```

# `normalized`

```elixir
@type normalized() :: nil | {module(), keyword()}
```

# `append`

```elixir
@callback append(
  Spectre.Journal.Record.t(),
  keyword()
) :: :ok | {:ok, term()} | {:error, term()}
```

# `erase_instance`
*optional* 

```elixir
@callback erase_instance(
  Spectre.Instance.Ref.t(),
  keyword()
) :: {:ok, :erased | :already_erased} | {:error, term()}
```

# `erase_instance`

```elixir
@spec erase_instance(normalized(), Spectre.Instance.Ref.t(), keyword()) ::
  {:ok, :erased | :already_erased | :not_configured} | {:error, term()}
```

Erases all journal records bound to one exact Instance Ref.

# `erasure_capability`

```elixir
@spec erasure_capability(normalized()) :: :ok | {:error, term()}
```

Checks whether a configured journal supports idempotent Instance erasure.

# `normalize`

```elixir
@spec normalize(config()) :: {:ok, normalized()} | {:error, term()}
```

Normalizes the journal configurations accepted by the runtime.

---

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