defaults

package
v0.1.144 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2026 License: GPL-2.0, GPL-3.0 Imports: 2 Imported by: 0

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

View Source
const (
	ExcludeTag = "no-subflux"
	LogLevel   = "info"
	LogFormat  = "json"
)

Default config string constants.

View Source
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.

View Source
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.

View Source
const (
	DefaultSessionIdleTimeout     = 24 * time.Hour
	DefaultSessionAbsoluteTimeout = 7 * 24 * time.Hour
)

Session timeout defaults.

View Source
const (
	MinScoreValue = 0
	MaxScoreValue = 100
)

Score range bounds for min_score validation.

Variables

This section is empty.

Functions

func FormatDuration

func FormatDuration(d time.Duration) string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL