badger

package
v0.2.3 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: 8 Imported by: 0

Documentation

Overview

Package badger is the run-state runstate driver (ADR-0094), backed by Badger v4. One driver serves every backend: New selects Badger's in-memory mode (tests/dev, hermetic — no files) or an on-disk directory (production durability). The backend is passed at New, so swapping memory↔file is a config change, not a code change — and the shared runstate.Contract proves both behave identically.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config) (runstate.Store, error)

New opens a run store on the configured backend and returns it as runstate.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).
	Dir string
}

Config selects the Badger backend for the run store.

Jump to

Keyboard shortcuts

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