config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFlags

func RegisterFlags(cmd *cobra.Command)

RegisterFlags registers all CLI flags

Types

type Config

type Config struct {
	// Observation settings for health monitoring
	ObservationPeriod  time.Duration // duration to observe before taking action
	UnhealthyThreshold int           // number of consecutive unhealthy checks before action
	// Operation mode
	Mode     string // full, update, watch, monitor
	RunOnce  bool
	Interval time.Duration
	Schedule string

	// Update settings
	Cleanup         bool
	NoRestart       bool
	NoPull          bool
	MonitorOnly     bool
	RollingRestart  bool
	StopTimeout     time.Duration
	LabelEnable     bool
	LabelName       string
	Scope           string
	LabelPrecedence bool

	// Container settings
	IncludeStopped    bool
	IncludeRestarting bool
	ReviveStopped     bool
	RemoveVolumes     bool
	DisableContainers []string

	// Health monitoring
	HealthWatch  bool
	HealthAction string // restart, notify
	HealthCheck  bool   // Internal health check mode

	// Secrets
	RegistrySecret string

	// Notifications
	NotificationURL string

	// API
	APIEnabled bool
	APIPort    int
	APIToken   string

	// Metrics
	MetricsEnabled bool

	// Logging
	LogLevel  string
	LogFormat string

	// Timezone
	TZ string
}

Config holds all configuration for DockWarden

func Load

func Load(cmd *cobra.Command) (*Config, error)

Load loads configuration from flags, environment, and secrets

Jump to

Keyboard shortcuts

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