Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultConfigurationFilePath is the default path that will be used to search for the configuration file // if a custom path isn't configured through the GATUS_CONFIG_PATH environment variable DefaultConfigurationFilePath = "config/config.yaml" // DefaultFallbackConfigurationFilePath is the default fallback path that will be used to search for the // configuration file if DefaultConfigurationFilePath didn't work DefaultFallbackConfigurationFilePath = "config/config.yml" )
Variables ¶
View Source
var ( // ErrNoEndpointInConfig is an error returned when a configuration file or directory has no endpoints configured ErrNoEndpointInConfig = errors.New("configuration should contain at least 1 endpoint") // ErrConfigFileNotFound is an error returned when a configuration file could not be found ErrConfigFileNotFound = errors.New("configuration file not found") // ErrInvalidSecurityConfig is an error returned when the security configuration is invalid ErrInvalidSecurityConfig = errors.New("invalid security configuration") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Debug Whether to enable debug logs Debug bool `yaml:"debug,omitempty"` // Metrics Whether to expose metrics at /metrics Metrics bool `yaml:"metrics,omitempty"` // SkipInvalidConfigUpdate Whether to make the application ignore invalid configuration // if the configuration file is updated while the application is running SkipInvalidConfigUpdate bool `yaml:"skip-invalid-config-update,omitempty"` // DisableMonitoringLock Whether to disable the monitoring lock // The monitoring lock is what prevents multiple endpoints from being processed at the same time. // Disabling this may lead to inaccurate response times DisableMonitoringLock bool `yaml:"disable-monitoring-lock,omitempty"` // Security is the configuration for securing access to Gatus Security *security.Config `yaml:"security,omitempty"` // Alerting is the configuration for alerting providers Alerting *alerting.Config `yaml:"alerting,omitempty"` // Endpoints is the list of endpoints to monitor Endpoints []*core.Endpoint `yaml:"endpoints,omitempty"` // ExternalEndpoints is the list of all external endpoints ExternalEndpoints []*core.ExternalEndpoint `yaml:"external-endpoints,omitempty"` // Storage is the configuration for how the data is stored Storage *storage.Config `yaml:"storage,omitempty"` // Web is the web configuration for the application Web *web.Config `yaml:"web,omitempty"` // UI is the configuration for the UI UI *ui.Config `yaml:"ui,omitempty"` // Maintenance is the configuration for creating a maintenance window in which no alerts are sent Maintenance *maintenance.Config `yaml:"maintenance,omitempty"` // Remote is the configuration for remote Gatus instances // WARNING: This is in ALPHA and may change or be completely removed in the future Remote *remote.Config `yaml:"remote,omitempty"` // Connectivity is the configuration for connectivity Connectivity *connectivity.Config `yaml:"connectivity,omitempty"` // contains filtered or unexported fields }
Config is the main configuration structure
func LoadConfiguration ¶ added in v5.2.0
LoadConfiguration loads the full configuration composed of the main configuration file and all composed configuration files
func (*Config) GetExternalEndpointByKey ¶ added in v5.9.0
func (config *Config) GetExternalEndpointByKey(key string) *core.ExternalEndpoint
func (*Config) HasLoadedConfigurationBeenModified ¶ added in v5.2.0
HasLoadedConfigurationBeenModified returns whether one of the file that the configuration has been loaded from has been modified since it was last read
func (*Config) UpdateLastFileModTime ¶
func (config *Config) UpdateLastFileModTime()
UpdateLastFileModTime refreshes Config.lastFileModTime
Click to show internal directories.
Click to hide internal directories.