metrics

package
v1.15.9 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 4 Imported by: 4

Documentation

Index

Constants

View Source
const LabelTargetNodeName = "target_node"

Variables

This section is empty.

Functions

func NewPrometheusMetrics

func NewPrometheusMetrics(namespace string, registry metrics.RegisterGatherer) *prometheusMetrics

NewPrometheusMetrics returns a new interface metrics implementation backed by Prometheus metrics.

func NewTriggerMetrics

func NewTriggerMetrics(namespace, name string) *triggerMetrics

func SinceInSeconds

func SinceInSeconds(start time.Time) float64

SinceInSeconds gets the time since the specified start in seconds.

Types

type NoOpMetrics

type NoOpMetrics struct{}

NoOpMetrics is a no-operation implementation of the metrics

func (*NoOpMetrics) AddIPAllocation

func (m *NoOpMetrics) AddIPAllocation(subnetID string, allocated int64)

func (*NoOpMetrics) AddIPRelease

func (m *NoOpMetrics) AddIPRelease(subnetID string, released int64)

func (*NoOpMetrics) AllocationAttempt

func (m *NoOpMetrics) AllocationAttempt(typ, status, subnetID string, observe float64)

func (*NoOpMetrics) DeleteNode

func (m *NoOpMetrics) DeleteNode(n string)

func (*NoOpMetrics) IncInterfaceAllocation

func (m *NoOpMetrics) IncInterfaceAllocation(subnetID string)

func (*NoOpMetrics) IncResyncCount

func (m *NoOpMetrics) IncResyncCount()

func (*NoOpMetrics) K8sSyncTrigger

func (m *NoOpMetrics) K8sSyncTrigger() trigger.MetricsObserver

func (*NoOpMetrics) PoolMaintainerTrigger

func (m *NoOpMetrics) PoolMaintainerTrigger() trigger.MetricsObserver

func (*NoOpMetrics) ReleaseAttempt

func (m *NoOpMetrics) ReleaseAttempt(typ, status, subnetID string, observe float64)

func (*NoOpMetrics) ResyncTrigger

func (m *NoOpMetrics) ResyncTrigger() trigger.MetricsObserver

func (*NoOpMetrics) SetAllocatedIPs

func (m *NoOpMetrics) SetAllocatedIPs(typ string, allocated int)

func (*NoOpMetrics) SetAvailableIPsPerSubnet

func (m *NoOpMetrics) SetAvailableIPsPerSubnet(subnetID, availabilityZone string, available int)

func (*NoOpMetrics) SetAvailableInterfaces

func (m *NoOpMetrics) SetAvailableInterfaces(available int)

func (*NoOpMetrics) SetEmptyInterfaceSlots

func (m *NoOpMetrics) SetEmptyInterfaceSlots(emptyInterfaceSlots int)

func (*NoOpMetrics) SetIPAvailable

func (m *NoOpMetrics) SetIPAvailable(node string, n int)

func (*NoOpMetrics) SetIPNeeded

func (m *NoOpMetrics) SetIPNeeded(node string, n int)

func (*NoOpMetrics) SetIPUsed

func (m *NoOpMetrics) SetIPUsed(node string, n int)

func (*NoOpMetrics) SetInterfaceCandidates

func (m *NoOpMetrics) SetInterfaceCandidates(interfaceCandidates int)

func (*NoOpMetrics) SetNodes

func (m *NoOpMetrics) SetNodes(category string, nodes int)

type NoOpMetricsObserver

type NoOpMetricsObserver struct{}

NoOpMetricsObserver is a no-operation implementation of the metrics observer

func (*NoOpMetricsObserver) PostRun

func (m *NoOpMetricsObserver) PostRun(callDuration, latency time.Duration, folds int)

MetricsObserver implementation

func (*NoOpMetricsObserver) QueueEvent

func (m *NoOpMetricsObserver) QueueEvent(reason string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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