probers

package
v0.0.0-...-3baac6f Latest Latest
Warning

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

Go to latest
Published: Nov 15, 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 CRLConf

type CRLConf struct {
	URL string `yaml:"url"`
}

CRLConf is exported to receive YAML configuration

func (CRLConf) Instrument

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

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

func (CRLConf) Kind

func (c CRLConf) Kind() string

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

func (CRLConf) MakeProber

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

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

func (CRLConf) UnmarshalSettings

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

UnmarshalSettings constructs a CRLConf object from YAML as bytes.

type CRLProbe

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

CRLProbe is the exported 'Prober' object for monitors configured to monitor CRL availability & characteristics.

func (CRLProbe) Kind

func (p CRLProbe) Kind() string

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

func (CRLProbe) Name

func (p CRLProbe) Name() string

Name returns a string that uniquely identifies the monitor.

func (CRLProbe) Probe

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

Probe requests the configured CRL and publishes metrics about it if found.

Jump to

Keyboard shortcuts

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