badger

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package badger is the dead-letter-queue deadletter driver (ADR-0118), backed by Badger v4 in a DEDICATED instance (never the metastore). 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>/deadletter, 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>/deadletter).
	Dir string
}

Config selects the Badger backend for the DLQ (mirrors internal/workflow/runstate/badger).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL