metrics

package
v0.31.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 4 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 {
	// contains filtered or unexported fields
}

func New

func New() *Metrics

func (Metrics) CollectWithStability

func (c Metrics) CollectWithStability(ch chan<- metrics.Metric)

CollectWithStability implements the metrics.StableCollector interface.

func (Metrics) DescribeWithStability

func (c Metrics) DescribeWithStability(ch chan<- *metrics.Desc)

DescribeWithStability implements the metrics.StableCollector interface.

func (Metrics) ForgetAPIService

func (c Metrics) ForgetAPIService(apiServiceKey string)

ForgetAPIService removes the availability gauge of the given apiservice.

func (*Metrics) Register

func (m *Metrics) Register(
	registrationFunc func(metrics.Registerable) error,
	customRegistrationFunc func(metrics.StableCollector) error,
) error

Register registers apiservice availability metrics.

func (Metrics) SetAPIServiceAvailable

func (c Metrics) SetAPIServiceAvailable(apiServiceKey string)

SetAPIServiceAvailable sets the given apiservice availability gauge to available.

func (Metrics) SetAPIServiceUnavailable

func (c Metrics) SetAPIServiceUnavailable(apiServiceKey string)

SetAPIServiceUnavailable sets the given apiservice availability gauge to unavailable.

func (*Metrics) SetUnavailableCounter

func (m *Metrics) SetUnavailableCounter(originalAPIService, newAPIService *apiregistrationv1.APIService)

SetUnavailableCounter increases the metrics only if the given service is unavailable and its APIServiceCondition has changed

func (*Metrics) SetUnavailableGauge

func (m *Metrics) SetUnavailableGauge(newAPIService *apiregistrationv1.APIService)

SetUnavailableGauge set the metrics so that it reflect the current state base on availability of the given service

func (*Metrics) UnavailableCounter

func (m *Metrics) UnavailableCounter(apiServiceName, reason string) metrics.CounterMetric

UnavailableCounter returns a counter to track apiservices marked as unavailable.

Jump to

Keyboard shortcuts

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