Documentation
¶
Overview ¶
Package config centralizes all RELAY_* env var parsing for the relay binary. It is the single source of truth for the env contract; grep here to learn what env vars Relay reads.
Load() validates inputs at boot (master key shape, cluster-mode enum, etc.) so subsystem constructors can trust the fields they receive. Subsystems do NOT read env vars themselves — they accept values via their own typed configs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Cluster
ClusterMode bool
// Backends
CatalogBackend string
StateBackend string
EventlogBackend string
// Connections
PGDSN string
RedisAddr string
CHDSN string
OTLPEndpoint string
// Auth
AdminToken string
MasterKey []byte // already parsed via crypto.ParseMasterKey; nil if unset
// Behavior knobs
CHRetentionDays int
AutoSeedIfEmpty bool
ConfigDir string
CatalogDir string
InstanceID string
EventlogDir string
MaxRequestBytes int64 // 0 = use httpmw.DefaultMaxRequestBytes
HealthzDeadlineMS int
ShutdownDeadlineS int
// ControlPort is the listener port for the control-plane HTTP server.
// Empty disables the control listener entirely (data plane only).
ControlPort string
// ControlAllowOrigins is the CORS allowlist for the control API. Comma-
// separated list of exact origin strings (no wildcards — credentialed
// CORS forbids them). Empty disables CORS entirely.
ControlAllowOrigins []string
// UIDisable suppresses serving the embedded admin UI on the control
// listener (RELAY_UI_DISABLE=1). Off by default; the UI is same-origin
// and adds no surface beyond the control API it already fronts.
UIDisable bool
}
Config holds every RELAY_* setting parsed and validated at startup.
Click to show internal directories.
Click to hide internal directories.