Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateConfig ¶
ValidateConfig verifies that the loaded configuration contains all required values.
Types ¶
type Config ¶
type Config struct {
AgentID string `yaml:"agent_id"`
APIToken string `yaml:"api_token"`
NodeID string `yaml:"node_id"`
NodeName string `yaml:"node_name"`
NodeRegion string `yaml:"node_region"`
Environment string `yaml:"environment"`
WorkspacePath string `yaml:"workspace_path"`
LogLevel string `yaml:"log_level"`
Deployments map[string]DeploymentConfig `yaml:"deployments"`
}
Config represents the root application configuration for the agent.
func LoadConfig ¶
LoadConfig reads and parses an agent configuration file from disk.
type DeployStepConfig ¶
type DeployStepConfig struct {
Type string `yaml:"type"`
Name string `yaml:"name"`
Command string `yaml:"command"`
Arguments []string `yaml:"arguments"`
TimeoutSeconds int `yaml:"timeout_seconds"`
WorkingDirectory string `yaml:"working_directory"`
Retries int `yaml:"retries"`
RetryDelaySeconds int `yaml:"retry_delay_seconds"`
ProcessName string `yaml:"process_name"`
StartCommand string `yaml:"start_command"`
URL string `yaml:"url"`
ExpectedStatus int `yaml:"expected_status"`
}
DeployStepConfig represents a single shell-based deployment step loaded from YAML.
func ExpandedDeploymentSteps ¶
func ExpandedDeploymentSteps( deployment DeploymentConfig, ) ([]DeployStepConfig, error)
ExpandedDeploymentSteps returns the final deployment step list.
If a deployment uses a preset, the preset is expanded into concrete steps. If no preset is provided, the manually configured steps are returned.
type DeploymentConfig ¶
type DeploymentConfig struct {
RepositoryPath string `yaml:"repository_path"`
Preset string `yaml:"preset"`
ProcessName string `yaml:"process_name"`
HealthCheckURL string `yaml:"health_check_url"`
HealthCheckExpectedStatus int `yaml:"health_check_expected_status"`
Steps []DeployStepConfig `yaml:"steps"`
}
DeploymentConfig defines the repository and step configuration used during deployment.
Click to show internal directories.
Click to hide internal directories.