...

Package probers

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

Overview ▾

type HTTPConf

HTTPConf is exported to receive YAML configuration.

type HTTPConf struct {
    URL       string `yaml:"url"`
    RCodes    []int  `yaml:"rcodes"`
    UserAgent string `yaml:"useragent"`
    Insecure  bool   `yaml:"insecure"`
}

func (HTTPConf) Instrument

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

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

func (HTTPConf) Kind

func (c HTTPConf) Kind() string

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

func (HTTPConf) MakeProber

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

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

func (HTTPConf) UnmarshalSettings

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

UnmarshalSettings takes YAML as bytes and unmarshals it to the to an HTTPConf object.

type HTTPProbe

HTTPProbe is the exported 'Prober' object for monitors configured to perform HTTP requests.

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

func (HTTPProbe) Kind

func (p HTTPProbe) Kind() string

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

func (HTTPProbe) Name

func (p HTTPProbe) Name() string

func (HTTPProbe) Probe

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

Probe performs the configured HTTP request.