config

package
v0.0.0-...-25b925c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileWatcher

func NewFileWatcher(fileName string) *fileWatcher

Types

type Config

type Config struct {
	// The protobuf containing the actual configuration values.
	pb.AlertManagerConfig
}

Config encapsulates the configuration of an Alert Manager instance. It wraps the raw configuration protocol buffer to be able to add custom methods to it.

func LoadFromFile

func LoadFromFile(fileName string) (Config, error)

func LoadFromString

func LoadFromString(configStr string) (Config, error)

func MustLoadFromFile

func MustLoadFromFile(fileName string) Config

func (Config) AggregationRules

func (c Config) AggregationRules() manager.AggregationRules

AggregationRules returns all the AggregationRules in a Config object.

func (Config) InhibitRules

func (c Config) InhibitRules() manager.InhibitRules

InhibitRules returns all the InhibitRules in a Config object.

func (Config) String

func (c Config) String() string

String returns an ASCII serialization of the loaded configuration protobuf.

func (Config) Validate

func (c Config) Validate() error

Validate checks an entire parsed Config for the validity of its fields.

type ReloadCallback

type ReloadCallback func(*Config)

type Watcher

type Watcher interface {
	Watch(c ReloadCallback)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL