probers

package
v0.0.0-...-6229936 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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSConf

type DNSConf struct {
	Proto   string `yaml:"protocol"`
	Server  string `yaml:"server"`
	Recurse bool   `yaml:"recurse"`
	QName   string `yaml:"query_name"`
	QType   string `yaml:"query_type"`
}

DNSConf is exported to receive YAML configuration

func (DNSConf) Instrument

func (c DNSConf) Instrument() map[string]prometheus.Collector

Instrument is a no-op to implement the `Configurer` interface.

func (DNSConf) Kind

func (c DNSConf) Kind() string

Kind returns a name that uniquely identifies the `Kind` of `Configurer`.

func (DNSConf) MakeProber

func (c DNSConf) MakeProber(_ map[string]prometheus.Collector) (probers.Prober, error)

MakeProber constructs a `DNSProbe` object from the contents of the bound `DNSConf` object. If the `DNSConf` cannot be validated, an error appropriate for end-user consumption is returned instead.

func (DNSConf) UnmarshalSettings

func (c DNSConf) UnmarshalSettings(settings []byte) (probers.Configurer, error)

UnmarshalSettings constructs a DNSConf object from YAML as bytes.

type DNSProbe

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

DNSProbe is the exported 'Prober' object for monitors configured to perform DNS requests.

func (DNSProbe) Kind

func (p DNSProbe) Kind() string

Kind returns a name that uniquely identifies the `Kind` of `Prober`.

func (DNSProbe) Name

func (p DNSProbe) Name() string

Name returns a string that uniquely identifies the monitor.

func (DNSProbe) Probe

func (p DNSProbe) Probe(timeout time.Duration) (bool, time.Duration)

Probe performs the configured DNS query.

Jump to

Keyboard shortcuts

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