...

Package probers

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

Overview ▾

type TLSConf

TLSConf is exported to receive YAML configuration.

type TLSConf struct {
    Hostname string `yaml:"hostname"`
    RootOrg  string `yaml:"rootOrg"`
    RootCN   string `yaml:"rootCN"`
    Response string `yaml:"response"`
}

func (TLSConf) Instrument

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

Instrument constructs any `prometheus.Collector` objects the `TLSProbe` will need to report its own metrics. A map is returned containing the constructed objects, indexed by the name of the Promtheus metric. If no objects were constructed, nil is returned.

func (TLSConf) Kind

func (c TLSConf) Kind() string

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

func (TLSConf) MakeProber

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

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

func (TLSConf) UnmarshalSettings

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

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

type TLSProbe

TLSProbe is the exported `Prober` object for monitors configured to perform TLS protocols.

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

func (TLSProbe) Kind

func (p TLSProbe) Kind() string

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

func (TLSProbe) Name

func (p TLSProbe) Name() string

Name returns a string that uniquely identifies the monitor.

func (TLSProbe) Probe

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

Probe performs the configured TLS probe. Return true if the root has the expected Subject (or if no root is provided for comparison in settings), and the end entity certificate has the correct expiration status (either expired or unexpired, depending on what is configured). Exports metrics for the NotAfter timestamp of the end entity certificate and the reason for the Probe returning false ("none" if returns true).