metricstore

package
v0.0.0-...-17967aa Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PrometheusNamespace is the namespace for appgw ingress controller
	PrometheusNamespace = "appgw_ingress_controller"

	// ErrorCode is a sub-label for keeping track of error for a specific error code
	ErrorCode = "error_code"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AGICMetricStore

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

AGICMetricStore is store

func (*AGICMetricStore) Handler

func (ms *AGICMetricStore) Handler() http.Handler

Handler return the registry

func (*AGICMetricStore) IncArmAPICallCounter

func (ms *AGICMetricStore) IncArmAPICallCounter()

IncArmAPICallCounter increases the counter for success on ARM

func (*AGICMetricStore) IncArmAPIUpdateCallFailureCounter

func (ms *AGICMetricStore) IncArmAPIUpdateCallFailureCounter()

IncArmAPIUpdateCallFailureCounter increases the counter for failure on ARM

func (*AGICMetricStore) IncArmAPIUpdateCallSuccessCounter

func (ms *AGICMetricStore) IncArmAPIUpdateCallSuccessCounter()

IncArmAPIUpdateCallSuccessCounter increases the counter for success on ARM

func (*AGICMetricStore) IncErrorCount

func (ms *AGICMetricStore) IncErrorCount(errorCode controllererrors.ErrorCode)

IncErrorCount increases the counter for a particular error code error encountered by AGIC

func (*AGICMetricStore) IncK8sAPIEventCounter

func (ms *AGICMetricStore) IncK8sAPIEventCounter()

IncK8sAPIEventCounter increases the counter after receiving a k8s Event

func (*AGICMetricStore) SetUpdateLatencySec

func (ms *AGICMetricStore) SetUpdateLatencySec(duration time.Duration)

SetUpdateLatencySec updates latency

func (*AGICMetricStore) Start

func (ms *AGICMetricStore) Start()

Start store

func (*AGICMetricStore) Stop

func (ms *AGICMetricStore) Stop()

Stop store

type MetricStore

type MetricStore interface {
	Start()
	Stop()
	Handler() http.Handler
	SetUpdateLatencySec(time.Duration)
	IncArmAPIUpdateCallFailureCounter()
	IncArmAPIUpdateCallSuccessCounter()
	IncArmAPICallCounter()
	IncK8sAPIEventCounter()
	IncErrorCount(controllererrors.ErrorCode)
}

MetricStore is store maintaining all metrics

func NewFakeMetricStore

func NewFakeMetricStore() MetricStore

NewFakeMetricStore return a fake metric store

func NewMetricStore

func NewMetricStore(envVariable environment.EnvVariables) MetricStore

NewMetricStore returns a new metric store

Jump to

Keyboard shortcuts

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