observer

package
v0.0.0-...-0e5e1e9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MonConf

type MonConf struct {
	Period   config.Duration  `yaml:"period"`
	Kind     string           `yaml:"kind" validate:"required,oneof=DNS HTTP CRL TLS TCP"`
	Settings probers.Settings `yaml:"settings" validate:"min=1,dive"`
}

MonConf is exported to receive YAML configuration in `ObsConf`.

type ObsConf

type ObsConf struct {
	DebugAddr     string           `yaml:"debugaddr" validate:"omitempty,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"`
}

ObsConf is exported to receive YAML configuration.

func (*ObsConf) MakeObserver

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.

type Observer

type Observer struct {
	// contains filtered or unexported fields
}

Observer is the steward of goroutines started for each `monitor`.

func (Observer) Start

func (o Observer) Start()

Start spins off a goroutine for each monitor, and waits for a signal to exit

Directories

Path Synopsis
package obsdialer contains a custom dialer for use in observers.
package obsdialer contains a custom dialer for use in observers.
crl
dns
tcp
tls

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL