Documentation
¶
Index ¶
- func ApplySectionAndProfile(v *viper.Viper, section, profile string) (*viper.Viper, error)
- func GetLogCounters() map[string]int64
- func LoadWithIncludes(base string, includes []string) (*viper.Viper, error)
- func MergeLogSection(v *viper.Viper)
- func SetupLoggerWithFile(level, format, filePath string, maxSizeMB, maxBackups, maxAgeDays int, ...)
- func ValidateAddr(addr string) error
- func ValidateAgentConfig(v *viper.Viper, strict bool) error
- func ValidateServerConfig(v *viper.Viper, strict bool) error
- func ValidateTLS(cert, key, ca string, strict bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplySectionAndProfile ¶
ApplySectionAndProfile extracts a section (server/agent/edge) and overlays profiles.<name> if present.
func GetLogCounters ¶
GetLogCounters returns current log counters by level.
func LoadWithIncludes ¶
LoadWithIncludes reads base config and merges includes in order.
func MergeLogSection ¶
MergeLogSection flattens a nested "log" section into top-level log.* keys.
func SetupLoggerWithFile ¶
func SetupLoggerWithFile(level, format, filePath string, maxSizeMB, maxBackups, maxAgeDays int, compress bool)
SetupLoggerWithFile configures both std log and slog default logger. format: console|json; level: debug|info|warn|error. If filePath != "", logs write to a rotating file.
func ValidateAddr ¶
func ValidateTLS ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.