MonConf is exported to receive YAML configuration in `ObsConf`.
type MonConf struct { Period config.Duration `yaml:"period"` Kind string `yaml:"kind" validate:"required,oneof=DNS HTTP CRL TLS"` Settings probers.Settings `yaml:"settings" validate:"min=1,dive"` }
ObsConf is exported to receive YAML configuration.
type ObsConf struct { DebugAddr string `yaml:"debugaddr" validate:"required,hostname_port"` Buckets []float64 `yaml:"buckets" validate:"min=1,dive"` Syslog cmd.SyslogConfig `yaml:"syslog"` OpenTelemetry cmd.OpenTelemetryConfig MonConfs []*MonConf `yaml:"monitors" validate:"min=1,dive"` }
func (c *ObsConf) MakeObserver() (*Observer, error)
MakeObserver constructs an `Observer` object from the contents of the bound `ObsConf`. If the `ObsConf` cannot be validated, an error appropriate for end-user consumption is returned instead.
Observer is the steward of goroutines started for each `monitor`.
type Observer struct {
// contains filtered or unexported fields
}
func (o Observer) Start()
Start spins off a goroutine for each monitor, and waits for a signal to exit