metrics

package
v1.22.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Dummy = &dummy{}

Dummy is a handy instnce of a dummy instrumenter, most of the times it will be used on tests.

Functions

This section is empty.

Types

type Instrumenter

type Instrumenter interface {
	SetClusterOK(namespace string, name string)
	SetClusterError(namespace string, name string)
	DeleteCluster(namespace string, name string)
}

Instrumenter is the interface that will collect the metrics and has ability to send/expose those metrics.

type PromMetrics

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

PromMetrics implements the instrumenter so the metrics can be managed by Prometheus.

func NewPrometheusMetrics

func NewPrometheusMetrics(path string, namespace string, mux *http.ServeMux, registry *prometheus.Registry) *PromMetrics

NewPrometheusMetrics returns a new PromMetrics object.

func (*PromMetrics) DeleteCluster

func (p *PromMetrics) DeleteCluster(namespace string, name string)

DeleteCluster set the cluster status to Error

func (*PromMetrics) SetClusterError

func (p *PromMetrics) SetClusterError(namespace string, name string)

SetClusterError set the cluster status to Error

func (*PromMetrics) SetClusterOK

func (p *PromMetrics) SetClusterOK(namespace string, name string)

SetClusterOK set the cluster status to OK

Jump to

Keyboard shortcuts

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