meta

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package meta is the server-owned meta store: a small SQLite database (a vault container by default, so it can be encrypted at rest) under data_dir that records runtime state the YAML config cannot — the databases created through the control plane, and the admin audit log. At startup the daemon reconciles config ∪ meta store: the file seeds, the meta store is the running truth for anything created at runtime (meta wins on a name conflict for entries it created).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is the open meta store handle.

func Open

func Open(cfg config.MetaStore, sec secret.Resolver, dataDir string, log *slog.Logger) (*Store, error)

Open opens (creating if absent) the meta store described by cfg. The vault backend without a key is a plain container and is warned about — encryption at rest needs meta_store.key.

func (*Store) Audit

func (s *Store) Audit(principal, action, db, detail string)

Audit appends one admin-action record. Best-effort: a failure is logged, not propagated, so auditing can't take the admin op down with it. Nil-safe: a stateless deployment (no meta store) simply drops the record, so callers can audit unconditionally — including denied/failed attempts.

func (*Store) Close

func (s *Store) Close() error

Close closes the meta store handle.

func (*Store) Databases

func (s *Store) Databases() ([]config.Database, error)

Databases returns the runtime-created database specs, for startup reconciliation. An entry whose spec no longer decodes is skipped with a loud warning rather than failing startup.

func (*Store) Delete

func (s *Store) Delete(name string) error

Delete forgets a runtime-created database spec. Deleting a name the meta store never recorded is a no-op.

func (*Store) Put

func (s *Store) Put(db config.Database) error

Put records (or replaces) a runtime-created database spec.

Jump to

Keyboard shortcuts

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