CRLConf is exported to receive YAML configuration
type CRLConf struct { URL string `yaml:"url"` }
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 (c CRLConf) Kind() string
Kind returns a name that uniquely identifies the `Kind` of `Configurer`.
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 (c CRLConf) UnmarshalSettings(settings []byte) (probers.Configurer, error)
UnmarshalSettings constructs a CRLConf object from YAML as bytes.
CRLProbe is the exported 'Prober' object for monitors configured to monitor CRL availability & characteristics.
type CRLProbe struct {
// contains filtered or unexported fields
}
func (p CRLProbe) Kind() string
Kind returns a name that uniquely identifies the `Kind` of `Prober`.
func (p CRLProbe) Name() string
Name returns a string that uniquely identifies the monitor.
func (p CRLProbe) Probe(timeout time.Duration) (bool, time.Duration)
Probe requests the configured CRL and publishes metrics about it if found.