alrm/config/host.go

15 lines
242 B
Go

package config
type Host struct {
Name string `yaml:"name"`
Address string `yaml:"address"`
Checks []Check `yaml:"checks"`
}
func (hst *Host) NameOrAddress() string {
if hst.Name == "" {
return hst.Address
}
return hst.Name
}