Documentation
¶
Index ¶
- type AlertflowConfig
- type ApiEndpointConfig
- type Config
- type ConfigurationManager
- func (cm *ConfigurationManager) GetConfig() Config
- func (cm *ConfigurationManager) GetRunnerID(platform string) string
- func (cm *ConfigurationManager) LoadConfig(configFile string) error
- func (cm *ConfigurationManager) ReloadConfig() error
- func (cm *ConfigurationManager) UpdateRunnerID(platform, id string)
- type PluginConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertflowConfig ¶
type ApiEndpointConfig ¶ added in v1.1.0
type ApiEndpointConfig struct {
Port int `mapstructure:"port" validate:"required,min=1024,max=65535"`
}
type Config ¶
type Config struct {
LogLevel string `mapstructure:"log_level" validate:"required,oneof=debug info warn error"`
Mode string `mapstructure:"mode" validate:"required,oneof=master worker"`
Alertflow AlertflowConfig `mapstructure:"alertflow" validate:"required"`
ExFlow exflowConfig `mapstructure:"exflow" validate:"required"`
ApiEndpoint ApiEndpointConfig `mapstructure:"api_endpoint" validate:"required"`
WorkspaceDir string `mapstructure:"workspace_dir" validate:"dir"`
PluginDir string `mapstructure:"plugin_dir" validate:"dir"`
Plugins []PluginConfig `mapstructure:"plugins"`
}
Config represents the application configuration
type ConfigurationManager ¶
type ConfigurationManager struct {
// contains filtered or unexported fields
}
ConfigurationManager handles all configuration operations
func GetInstance ¶
func GetInstance() *ConfigurationManager
GetInstance returns the singleton configuration manager instance
func (*ConfigurationManager) GetConfig ¶
func (cm *ConfigurationManager) GetConfig() Config
GetConfig returns a copy of the current configuration
func (*ConfigurationManager) GetRunnerID ¶
func (cm *ConfigurationManager) GetRunnerID(platform string) string
GetRunnerIDs returns the current runner IDs for both Alertflow and ExFlow
func (*ConfigurationManager) LoadConfig ¶
func (cm *ConfigurationManager) LoadConfig(configFile string) error
LoadConfig initializes the configuration from file and environment
func (*ConfigurationManager) ReloadConfig ¶
func (cm *ConfigurationManager) ReloadConfig() error
ReloadConfig reloads the configuration from the file
func (*ConfigurationManager) UpdateRunnerID ¶
func (cm *ConfigurationManager) UpdateRunnerID(platform, id string)
UpdateRunnerID updates the runner ID in the configuration for both Alertflow and ExFlow
type PluginConfig ¶
Click to show internal directories.
Click to hide internal directories.