...

Package probers

import "github.com/letsencrypt/boulder/observer/probers/dns"
Overview
Index

Overview ▾

type DNSConf

DNSConf is exported to receive YAML configuration

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"`
}

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

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

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

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.