Documentation
¶
Overview ¶
Package admin is the control plane: the /_admin HTTP surface for runtime database lifecycle (create / detach / list) and vault maintenance (offline compact, online reclaim, snapshot). Every route requires an admin capability — a server-admin principal, or (for a single database's maintenance) an `admin` grant on that database — and every mutating action is audit-logged to the meta store. It shares the same auth middleware and transports as the data plane; it is a distinct http.Handler mounted under /_admin by the main handler.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler serves /_admin/*. It is nil-safe to construct without a meta store (Store may be nil for a stateless deployment): create/detach then don't persist across restart, and audit records are dropped.
func New ¶
func New(reg *registry.Registry, pol *authz.Policy, store *meta.Store, sessions *session.Store, sec secret.Resolver, metrics obs.Metrics, dataDir string, admins []string, started time.Time, log *slog.Logger) *Handler
New builds the admin handler. admins are the server-admin principal names from control_plane.admins; sessions (may be nil) backs the sessions/kill endpoints; metrics (may be nil) has a detached database's series forgotten; started is used for the uptime report.