Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExporterCollector ¶
type ExporterCollector struct { StartTime *prometheus.Desc BuildInfo *prometheus.Desc // contains filtered or unexported fields }
ExporterCollector collects metrics, mostly runtime, about this exporter in general.
func NewExporterCollector ¶
func NewExporterCollector(osVersion, goVersion, gitCommit string, startTime int64) *ExporterCollector
NewExporterCollector is a function that returns a new ExporterCollector.
func (*ExporterCollector) Collect ¶
func (c *ExporterCollector) Collect(ch chan<- prometheus.Metric)
Collect implements Prometheus' Collector interface and is used to collect metrics
func (*ExporterCollector) Describe ¶
func (c *ExporterCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements Prometheus' Collector interface and is used to describe metrics
type HostsCollector ¶
type HostsCollector struct { // Metrics CertificateRecords *prometheus.Desc CertificateExpiry *prometheus.Desc // contains filtered or unexported fields }
HostsCollector is a type that represents a collector of host records
func NewHostsCollector ¶
func NewHostsCollector(hosts []string, log *slog.Logger) *HostsCollector
NewHostsCollector is a function that returns a new HostCollector
func (*HostsCollector) Collect ¶
func (c *HostsCollector) Collect(ch chan<- prometheus.Metric)
Collect implements Prometheus' Collector interface and is used to collect metrics
func (*HostsCollector) Describe ¶
func (c *HostsCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements Prometheus' Collector interface and is used to describe metrics
type Record ¶
type Record struct { IssueCAID int `json:"issuer_ca_id"` IssuerName string `json:"issuer_name"` CommonName string `json:"common_name"` NameValue string `json:"name_value"` ID int `json:"id"` EntryTimestamp Time `json:"entry_timestamp"` NotBefore Time `json:"not_before"` NotAfter Time `json:"not_after"` SerialNumber string `json:"serial_number"` }
Record is a type that represents a crt.sh result record
type Time ¶
Time provides an alternative JSON unmarshaler for string-encoded dates Dates are returned either as 2006-01-02T15:04:05.999 or without milliseconds
func (*Time) UnmarshalJSON ¶
UnmarshalJSON is a method that converts a string-encoded date into a Time