Documentation
¶
Overview ¶
Package config loads application configuration from environment variables. All configuration is immutable after initialization (CFG-2).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// DBPath is the path to the SQLite database file.
DBPath string
// PeeringDBBaseURL is the base URL for the PeeringDB API.
PeeringDBBaseURL string
// SyncToken is the shared secret for on-demand sync trigger authentication.
SyncToken string
// SyncInterval is the duration between automatic sync runs.
SyncInterval time.Duration
// IncludeDeleted controls whether objects with status=deleted are synced.
IncludeDeleted bool
// ListenAddr is the address the HTTP server binds to.
ListenAddr string
// IsPrimary indicates whether this instance is the LiteFS primary node.
IsPrimary bool
// CORSOrigins is a comma-separated list of allowed CORS origins.
// Configured via PDBPLUS_CORS_ORIGINS. Default is "*".
CORSOrigins string
// DrainTimeout is the graceful shutdown drain timeout.
// Configured via PDBPLUS_DRAIN_TIMEOUT. Default is 10 seconds.
DrainTimeout time.Duration
// OTelSampleRate is the trace sampling ratio (0.0 to 1.0).
// Configured via PDBPLUS_OTEL_SAMPLE_RATE. Default is 1.0 (always sample) per D-02.
OTelSampleRate float64
// SyncStaleThreshold is the maximum age of sync data before health reports degraded.
// Configured via PDBPLUS_SYNC_STALE_THRESHOLD. Default is 24h per D-12.
SyncStaleThreshold time.Duration
}
Config holds all application configuration. Immutable after Load returns.
Click to show internal directories.
Click to hide internal directories.