Documentation
¶
Overview ¶
Package badger is the dead-letter-queue deadletter driver (ADR-0118), backed by Badger v4 in its own instance (never the metastore), which the event store shares with the blob seen lists (ADR-0201, NewOnDB). It mirrors the ADR-0094 run-state driver: one driver serves every backend — New selects Badger's in-memory mode (tests/dev, hermetic — no files) or an on-disk directory (<dataDir>/eventstore, production). Key layout is dl/<ns>/<ulid>: the ULID makes a namespace's keys time-sortable, so cap eviction takes the oldest cheaply. The store imports NO bus — the DLQ guarantee is bus-driver-independent. The shared deadletter.Contract proves memory and this driver behave identically.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(cfg Config) (deadletter.Store, error)
New opens a dead-letter store on the configured backend and returns it as deadletter.Store.
Types ¶
type Config ¶
type Config struct {
// InMemory runs Badger fully in memory (tests/dev) — no files, no disk.
InMemory bool
// Dir is the on-disk data directory when InMemory is false (production: <dataDir>/eventstore).
Dir string
}
Config selects the Badger backend for the DLQ (mirrors internal/workflow/runstate/badger).