metrics

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package metrics provides an abstraction around metrics collection in order to bundle all metrics related calls in one location

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler() http.Handler

Handler returns the handler to be registered at /metrics

Types

type Collector

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

Collector contains all required methods to collect metrics and to populate them into the Handler

func New

func New() *Collector

New creates a new Collector and registers the metrics

func (Collector) CountSecretCreateError

func (c Collector) CountSecretCreateError(reason string)

CountSecretCreateError signalizes an error occurred during secret creation. The reason must not be the error.Error() but a simple static string describing the error.

func (Collector) CountSecretCreated

func (c Collector) CountSecretCreated()

CountSecretCreated signalizes a secret has successfully been created

func (Collector) CountSecretRead

func (c Collector) CountSecretRead()

CountSecretRead signalizes a secret has successfully been read and destroyed

func (Collector) CountSecretReadError

func (c Collector) CountSecretReadError(reason string)

CountSecretReadError signalizes an error occurred during secret read. The reason must not be the error.Error() but a simple static string describing the error.

func (Collector) UpdateSecretsCount

func (c Collector) UpdateSecretsCount(count int64)

UpdateSecretsCount sets the current amount of secrets stored in the backend storage

Jump to

Keyboard shortcuts

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