Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Listen string `yaml:"listen"` MetricsPath string `yaml:"metrics_path"` AlertsPath string `yaml:"alerts_path"` Receivers map[string]Receiver `yaml:"receivers"` TimeIntervals TimeIntervalsMap `yaml:"time_intervals"` }
func DefaultConfig ¶
func DefaultConfig() Config
func (*Config) UnmarshalYAML ¶
UnmarshalYAML implements the Unmarshaller interface for Config
type Match ¶
type Match struct { Labels map[string]utils.StringArray `yaml:"labels"` Times []string `yaml:"times"` }
func (*Match) IsTimeMatch ¶
func (m *Match) IsTimeMatch(timeIntervalsMap TimeIntervalsMap, time time.Time) bool
type SafeConfig ¶
SafeConfig is a thread safe config handler
func (*SafeConfig) LoadConfig ¶
func (sc *SafeConfig) LoadConfig() (err error)
LoadConfig reads and parses the file from disk
type Target ¶
type Target struct { URL am_config.URL `yaml:"url"` HTTPConfig commoncfg.HTTPClientConfig `yaml:"http_config"` HTTPClient *http.Client }
func (*Target) CreateProxy ¶ added in v0.2.0
func (*Target) UnmarshalYAML ¶
UnmarshalYAML implements the Unmarshaller interface for Target
type TimeIntervalsMap ¶
type TimeIntervalsMap map[string][]timeinterval.TimeInterval
Click to show internal directories.
Click to hide internal directories.