Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CircuitBreakerConfig ¶
type CircuitBreakerConfig struct {
FailureThreshold int `yaml:"failure_threshold"`
Timeout time.Duration `yaml:"timeout"`
}
CircuitBreakerConfig defines circuit breaker settings
type Config ¶
type Config struct {
AgentID string `yaml:"agent_id"`
Hostname string `yaml:"hostname"`
ControlServer ControlServerConfig `yaml:"control_server"`
TLS TLSConfig `yaml:"tls"`
Ocserv OcservConfig `yaml:"ocserv"`
Health HealthConfig `yaml:"health"`
Telemetry TelemetryConfig `yaml:"telemetry"`
Logging LoggingConfig `yaml:"logging"`
Security SecurityConfig `yaml:"security"`
}
Config represents the complete agent configuration
type ControlServerConfig ¶
type ControlServerConfig struct {
Address string `yaml:"address"`
Reconnect ReconnectConfig `yaml:"reconnect"`
CircuitBreaker CircuitBreakerConfig `yaml:"circuit_breaker"`
}
ControlServerConfig defines connection settings to control server
type HealthConfig ¶
type HealthConfig struct {
HeartbeatInterval time.Duration `yaml:"heartbeat_interval"`
DeepCheckInterval time.Duration `yaml:"deep_check_interval"`
MetricsInterval time.Duration `yaml:"metrics_interval"`
}
HealthConfig defines health check intervals
type LoggingConfig ¶
type LoggingConfig struct {
Level string `yaml:"level"`
Format string `yaml:"format"`
Output string `yaml:"output"`
FilePath string `yaml:"file_path"`
MaxSizeMB int `yaml:"max_size_mb"`
MaxBackups int `yaml:"max_backups"`
MaxAgeDays int `yaml:"max_age_days"`
}
LoggingConfig defines logging behavior
type OcservConfig ¶
type OcservConfig struct {
ConfigPath string `yaml:"config_path"`
ConfigPerUserDir string `yaml:"config_per_user_dir"`
ConfigPerGroupDir string `yaml:"config_per_group_dir"`
CtlSocket string `yaml:"ctl_socket"`
SystemdService string `yaml:"systemd_service"`
BackupDir string `yaml:"backup_dir"`
}
OcservConfig defines ocserv paths and settings
type ReconnectConfig ¶
type ReconnectConfig struct {
InitialDelay time.Duration `yaml:"initial_delay"`
MaxDelay time.Duration `yaml:"max_delay"`
Multiplier float64 `yaml:"multiplier"`
MaxAttempts int `yaml:"max_attempts"`
}
ReconnectConfig defines reconnection behavior
type SecurityConfig ¶
type SecurityConfig struct {
AllowedCommands []string `yaml:"allowed_commands"`
SudoUser string `yaml:"sudo_user"`
MaxCommandTimeout time.Duration `yaml:"max_command_timeout"`
}
SecurityConfig defines security constraints
type TLSConfig ¶
type TLSConfig struct {
Enabled bool `yaml:"enabled"`
AutoGenerate bool `yaml:"auto_generate"` // Auto-generate self-signed certs if missing
CertFile string `yaml:"cert_file"`
KeyFile string `yaml:"key_file"`
CAFile string `yaml:"ca_file"`
ServerName string `yaml:"server_name"`
MinVersion string `yaml:"min_version"`
}
TLSConfig defines mTLS configuration
Click to show internal directories.
Click to hide internal directories.