Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultTargetGroup sets the default configuration for the TargetGroup DefaultTargetGroup = TargetGroup{ Interval: time.Second, Network: "ip", Protocol: "icmp", Size: 56, } )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Targets []TargetGroup `yaml:"targets"`
}
func (*Config) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface.
type SafeConfig ¶
func (*SafeConfig) ReloadConfig ¶
func (sc *SafeConfig) ReloadConfig(confFile string) (err error)
type TargetGroup ¶
type TargetGroup struct {
Hosts []string `yaml:"hosts"`
Host string `yaml:"host,omitempty"`
Interval time.Duration `yaml:"interval,omitempty"`
Network string `yaml:"network,omitempty"`
Protocol string `yaml:"protocol,omitempty"`
Size int `yaml:"size,omitempty"`
Source string `yaml:"source,omitempty"`
ToS uint8 `yaml:"tos,omitempty"`
Labels map[string]string `yaml:"labels,omitempty"`
}
TargetGroup supports both the original list of hosts and the new single host format. If `host` is set, it is folded into `hosts`.
func (*TargetGroup) UnmarshalYAML ¶
func (s *TargetGroup) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.