alrm/config/host.go

15 lines
242 B
Go
Raw Normal View History

package config
type Host struct {
2021-11-14 07:04:25 -09:00
Name string `yaml:"name"`
Address string `yaml:"address"`
Checks []Check `yaml:"checks"`
}
2021-11-14 07:04:25 -09:00
func (hst *Host) NameOrAddress() string {
if hst.Name == "" {
return hst.Address
}
2021-11-14 07:04:25 -09:00
return hst.Name
}