metrics

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	*http.Server
	// contains filtered or unexported fields
}

Metrics exposes certificate checks as prometheus metrics

func New

func New(log *logrus.Entry) *Metrics

New returns a new configured instance of the Metrics server

func (*Metrics) AddCertificateInfo

func (m *Metrics) AddCertificateInfo(cer models.Certificate, isValid bool)

AddCertificateInfo registers a new or updates and existing certificate record

func (*Metrics) RemoveCertificateInfo

func (m *Metrics) RemoveCertificateInfo(dns string)

RemoveCertificateInfo removed an existing certificate record

func (*Metrics) Run

func (m *Metrics) Run(servingAddress string) error

Run will run the metrics server

func (*Metrics) Shutdown

func (m *Metrics) Shutdown() error

Shutdown closes the metrics server gracefully

Jump to

Keyboard shortcuts

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