Documentation ¶
Index ¶
Constants ¶
View Source
const ( ALERT_ROOT = "alerts" SILENCES_LEAF = "silences" ACK_LEAF = "acks" )
Variables ¶
This section is empty.
Functions ¶
func RegisterNodes ¶
func RegisterNodes()
Types ¶
type ConfigFile ¶
type ConfigFile struct {
// contains filtered or unexported fields
}
func LoadConfigFile ¶
func LoadConfigFile(path string, logger zerolog.Logger) (*ConfigFile, error)
LoadConfigFile reads the given file, and parses it into a config, returning any parsing errors.
func (*ConfigFile) GetNotifiersForAlert ¶
func (c *ConfigFile) GetNotifiersForAlert(ctx context.Context, a *model.Alert) []config.NotifierSettings
GetNotifiersForAlert walks the config graph, building up notification settings as we go before returning a list of notifiers we hit along the way. We expect here that the ConfigFile has been passed through `Validate` already, and thus is assumed to have no cycles.
func (*ConfigFile) Globals ¶
func (c *ConfigFile) Globals() *config.Globals
func (*ConfigFile) Validate ¶
func (c *ConfigFile) Validate() error
Validate returns nil if the config is valid, or an error to be displayed to the user if not.
func (*ConfigFile) ValidateData ¶
Click to show internal directories.
Click to hide internal directories.