Documentation
¶
Overview ¶
Package config loads runtime configuration from flags and environment variables and resolves sensible cross-platform defaults.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Addr is the listen address. Defaults to loopback only; binding to a
// public interface is an explicit, conscious choice by the operator.
Addr string
// DataDir holds the SQLite database and any persisted secrets.
DataDir string
// SessionTTL is how long a logged-in session token stays valid.
SessionTTL time.Duration
// Dev enables developer conveniences (e.g. permissive CORS for Vite).
Dev bool
// MetricsToken, when set, requires a bearer token to scrape /metrics.
// Empty means the endpoint is open (fine for loopback-only use).
MetricsToken string
// Metrics history backend. RedisAddr empty → in-memory ring buffer.
RedisAddr string
RedisPassword string
RedisDB int
MetricsRetention time.Duration
}
Config holds all runtime options.
Click to show internal directories.
Click to hide internal directories.