metrics

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const MetricNamespace = "version_checker"

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

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

Metrics is used to expose container image version checks as prometheus metrics.

func New

func New(log *logrus.Entry, reg ctrmetrics.RegistererGatherer, kubeClient k8sclient.Client) *Metrics {

func (*Metrics) AddImage

func (m *Metrics) AddImage(namespace, pod, container, containerType, imageURL string, isLatest bool, currentVersion, latestVersion string)

func (*Metrics) PodExists added in v0.9.0

func (m *Metrics) PodExists(ctx context.Context, ns, name string) bool

This _should_ leverage the Controllers Cache

func (*Metrics) RegisterImageDuration added in v0.9.0

func (m *Metrics) RegisterImageDuration(namespace, pod, container, image string, startTime time.Time)

func (*Metrics) RemoveImage

func (m *Metrics) RemoveImage(namespace, pod, container, containerType string)

func (*Metrics) RemovePod added in v0.9.0

func (m *Metrics) RemovePod(namespace, pod string)

func (*Metrics) ReportError added in v0.9.0

func (m *Metrics) ReportError(namespace, pod, container, imageURL string)

func (*Metrics) RoundTripper added in v0.9.0

func (m *Metrics) RoundTripper(baseTransport http.RoundTripper) http.RoundTripper

RoundTripper provides Prometheus instrumentation for an HTTP client, including domain labels.

type RoundTripper added in v0.9.0

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

func NewRoundTripper added in v0.9.0

func NewRoundTripper(reg prometheus.Registerer) *RoundTripper

func (*RoundTripper) RoundTrip added in v0.9.0

func (t *RoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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