Documentation
¶
Index ¶
- func GetConfigPath(defaultPath string) string
- func ParseDuration(durationStr string) (time.Duration, error)
- type AgentConfig
- type AgentInfoConfig
- type AgentManagementConfig
- type CoreConfig
- type DockerConfig
- type PluginConfig
- type SecurityConfig
- type ServerConfig
- type ServerConnectionConfig
- type StacksConfig
- type TLSConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigPath ¶
GetConfigPath returns the appropriate config path based on environment variables or defaults
Types ¶
type AgentConfig ¶
type AgentConfig struct {
Agent AgentInfoConfig `yaml:"agent"`
Server ServerConfig `yaml:"server"`
ServerConnection ServerConnectionConfig `yaml:"server_connection"`
Docker DockerConfig `yaml:"docker"`
Stacks StacksConfig `yaml:"stacks"`
Plugins PluginConfig `yaml:"plugins"`
Security SecurityConfig `yaml:"security"`
}
AgentConfig represents the configuration for the agent
func CreateDefaultAgentConfig ¶
func CreateDefaultAgentConfig() *AgentConfig
CreateDefaultAgentConfig creates a default agent configuration
func LoadAgentConfig ¶
func LoadAgentConfig(configPath string) (*AgentConfig, error)
LoadAgentConfig loads the agent configuration from a YAML file
type AgentInfoConfig ¶
type AgentInfoConfig struct {
ID string `yaml:"id"`
Hostname string `yaml:"hostname"`
Labels map[string]string `yaml:"labels"`
}
AgentInfoConfig contains agent identification configuration
type AgentManagementConfig ¶
type AgentManagementConfig struct {
HeartbeatInterval string `yaml:"heartbeat_interval"`
OfflineTimeout string `yaml:"offline_timeout"`
AutoDeregister bool `yaml:"auto_deregister"`
}
AgentManagementConfig contains agent management configuration
type CoreConfig ¶
type CoreConfig struct {
Server ServerConfig `yaml:"server"`
Plugins PluginConfig `yaml:"plugins"`
AgentManagement AgentManagementConfig `yaml:"agent_management"`
PluginDir string `yaml:"plugin_dir"`
}
CoreConfig represents the configuration for the core server
func CreateDefaultCoreConfig ¶
func CreateDefaultCoreConfig() *CoreConfig
CreateDefaultCoreConfig creates a default core configuration
func LoadCoreConfig ¶
func LoadCoreConfig(configPath string) (*CoreConfig, error)
LoadCoreConfig loads the core server configuration from a YAML file
type DockerConfig ¶
DockerConfig contains Docker-related configuration
type PluginConfig ¶
type PluginConfig struct {
Enabled map[string]bool `yaml:"enabled"`
Configs map[string]map[string]interface{} `yaml:"configs,omitempty"`
}
PluginConfig contains plugin-related configuration
type SecurityConfig ¶
type SecurityConfig struct {
ExecTimeout string `yaml:"exec_timeout"`
LogRetention string `yaml:"log_retention"`
TerminalRecording bool `yaml:"terminal_recording"`
}
SecurityConfig contains security-related configuration
type ServerConfig ¶
ServerConfig contains server-related configuration
type ServerConnectionConfig ¶
type ServerConnectionConfig struct {
CoreAddr string `yaml:"core_addr"`
TLS TLSConfig `yaml:"tls"`
}
ServerConnectionConfig contains connection configuration to the core server
type StacksConfig ¶
type StacksConfig struct {
RootDir string `yaml:"root_dir"`
MaxConcurrentOperations int `yaml:"max_concurrent_operations"`
}
StacksConfig contains stack-related configuration