Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Enabled *bool `yaml:"enabled"` // Whether the maintenance period is enabled. Enabled by default if nil. Start string `yaml:"start"` // Time at which the maintenance period starts (e.g. 23:00) Duration time.Duration `yaml:"duration"` // Duration of the maintenance period (e.g. 4h) // Every is a list of days of the week during which maintenance period applies. // See longDayNames for list of valid values. // Every day if empty. Every []string `yaml:"every"` // contains filtered or unexported fields }
Config allows for the configuration of a maintenance period. During this maintenance period, no alerts will be sent.
Uses UTC.
func GetDefaultConfig ¶
func GetDefaultConfig() *Config
func (Config) IsUnderMaintenance ¶
IsUnderMaintenance checks whether the endpoints that Gatus monitors are within the configured maintenance window
func (*Config) ValidateAndSetDefaults ¶
ValidateAndSetDefaults validates the maintenance configuration and sets the default values if necessary.
Must be called once in the application's lifecycle before IsUnderMaintenance is called, since it also sets durationToStartFromMidnight.
Click to show internal directories.
Click to hide internal directories.