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 ¶
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) Databases ¶
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.