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.
Summary
Functions
Erases all journal records bound to one exact Instance Ref.
Checks whether a configured journal supports idempotent Instance erasure.
Normalizes the journal configurations accepted by the runtime.
Types
Callbacks
@callback append( Spectre.Journal.Record.t(), keyword() ) :: :ok | {:ok, term()} | {:error, term()}
@callback erase_instance( Spectre.Instance.Ref.t(), keyword() ) :: {:ok, :erased | :already_erased} | {:error, term()}
Functions
@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.
@spec erasure_capability(normalized()) :: :ok | {:error, term()}
Checks whether a configured journal supports idempotent Instance erasure.
@spec normalize(config()) :: {:ok, normalized()} | {:error, term()}
Normalizes the journal configurations accepted by the runtime.