Documentation
¶
Overview ¶
Package defaults provides shared configuration constants and helpers used by both config/ and config/schema/. Extracting these into a leaf package prevents a circular import risk between config and schema.
Index ¶
Constants ¶
const ( ExcludeTag = "no-subflux" LogLevel = "info" LogFormat = "json" )
Default config string constants.
const ( DefaultPollInterval = 30 * time.Second DefaultScanInterval = 24 * time.Hour DefaultScanDelay = 5 * time.Second DefaultProviderTimeout = time.Hour DefaultUpgradeWindowDays = 7 DefaultMaxSSEClients = 32 DefaultAdaptiveInitDelay = 7 * 24 * time.Hour DefaultAdaptiveMaxDelay = 3 * 730 * time.Hour DefaultBackoffMultiplier = 2 DefaultBackupFrequency = 24 * time.Hour DefaultBackupRetention = 7 )
Default duration and numeric values used by both config loading and schema.
const ( MinPollInterval = 10 * time.Second MinScanDelay = 5 * time.Second MinProviderTimeout = time.Hour MinScanInterval = time.Hour MinBackupFrequency = time.Hour )
Minimum validation thresholds — the floor below which config is rejected.
const ( DefaultSessionIdleTimeout = 24 * time.Hour DefaultSessionAbsoluteTimeout = 7 * 24 * time.Hour )
Session timeout defaults.
const ( MinScoreValue = 0 MaxScoreValue = 100 )
Score range bounds for min_score validation.
Variables ¶
This section is empty.
Functions ¶
func FormatDuration ¶
FormatDuration converts a time.Duration to a human-friendly config string. Prefers the largest clean unit (M > D > h > m > s). Sub-second precision is truncated to whole seconds; callers should only pass durations that are meaningful at second granularity or above.
Types ¶
This section is empty.