Documentation ¶
Overview ¶
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Package metrics is a generated GoMock package.
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Index ¶
- Variables
- func GetCounterValue(m prometheus.Counter) float64
- func InitializeMetrics()
- func ToPrometheusType(metric interface{}) prometheus.Collector
- type ICounterVec
- type IGaugeVec
- type IHistogramVec
- type MockICounterVec
- type MockICounterVecMockRecorder
- type MockIGaugeVec
- type MockIGaugeVecMockRecorder
- type MockIHistogramVec
- type MockIHistogramVecMockRecorder
Constants ¶
This section is empty.
Variables ¶
var ( // Common counters across os distributions DropCounter IGaugeVec DropBytesCounter IGaugeVec ForwardCounter IGaugeVec ForwardBytesCounter IGaugeVec WindowsCounter IGaugeVec // Common gauges across os distributions NodeConnectivityStatusGauge IGaugeVec NodeConnectivityLatencyGauge IGaugeVec // TCP Stats TCPStateGauge IGaugeVec TCPConnectionRemoteGauge IGaugeVec TCPConnectionStats IGaugeVec TCPFlagCounters IGaugeVec // IP States IPConnectionStats IGaugeVec // UDP Stats UDPConnectionStats IGaugeVec UDPActiveSocketsCounter IGaugeVec // Interface Stats InterfaceStats IGaugeVec // Control Plane Metrics PluginManagerFailedToReconcileCounter ICounterVec LostEventsCounter ICounterVec // DNS Metrics. DNSRequestCounter ICounterVec DNSResponseCounter ICounterVec )
Metric Counters
Functions ¶
func GetCounterValue ¶
func GetCounterValue(m prometheus.Counter) float64
GetCounterValue returns the current value stored for the counter
func ToPrometheusType ¶
func ToPrometheusType(metric interface{}) prometheus.Collector
Types ¶
type ICounterVec ¶
type ICounterVec interface { WithLabelValues(lvs ...string) prometheus.Counter GetMetricWithLabelValues(lvs ...string) (prometheus.Counter, error) }
type IGaugeVec ¶
type IGaugeVec interface { WithLabelValues(lvs ...string) prometheus.Gauge GetMetricWithLabelValues(lvs ...string) (prometheus.Gauge, error) }
type IHistogramVec ¶
type MockICounterVec ¶
type MockICounterVec struct {
// contains filtered or unexported fields
}
MockICounterVec is a mock of ICounterVec interface.
func NewMockICounterVec ¶
func NewMockICounterVec(ctrl *gomock.Controller) *MockICounterVec
NewMockICounterVec creates a new mock instance.
func (*MockICounterVec) EXPECT ¶
func (m *MockICounterVec) EXPECT() *MockICounterVecMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockICounterVec) GetMetricWithLabelValues ¶
func (m *MockICounterVec) GetMetricWithLabelValues(lvs ...string) (prometheus.Counter, error)
GetMetricWithLabelValues mocks base method.
func (*MockICounterVec) WithLabelValues ¶
func (m *MockICounterVec) WithLabelValues(lvs ...string) prometheus.Counter
WithLabelValues mocks base method.
type MockICounterVecMockRecorder ¶
type MockICounterVecMockRecorder struct {
// contains filtered or unexported fields
}
MockICounterVecMockRecorder is the mock recorder for MockICounterVec.
func (*MockICounterVecMockRecorder) GetMetricWithLabelValues ¶
func (mr *MockICounterVecMockRecorder) GetMetricWithLabelValues(lvs ...any) *gomock.Call
GetMetricWithLabelValues indicates an expected call of GetMetricWithLabelValues.
func (*MockICounterVecMockRecorder) WithLabelValues ¶
func (mr *MockICounterVecMockRecorder) WithLabelValues(lvs ...any) *gomock.Call
WithLabelValues indicates an expected call of WithLabelValues.
type MockIGaugeVec ¶
type MockIGaugeVec struct {
// contains filtered or unexported fields
}
MockIGaugeVec is a mock of IGaugeVec interface.
func NewMockIGaugeVec ¶
func NewMockIGaugeVec(ctrl *gomock.Controller) *MockIGaugeVec
NewMockIGaugeVec creates a new mock instance.
func (*MockIGaugeVec) EXPECT ¶
func (m *MockIGaugeVec) EXPECT() *MockIGaugeVecMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIGaugeVec) GetMetricWithLabelValues ¶
func (m *MockIGaugeVec) GetMetricWithLabelValues(lvs ...string) (prometheus.Gauge, error)
GetMetricWithLabelValues mocks base method.
func (*MockIGaugeVec) WithLabelValues ¶
func (m *MockIGaugeVec) WithLabelValues(lvs ...string) prometheus.Gauge
WithLabelValues mocks base method.
type MockIGaugeVecMockRecorder ¶
type MockIGaugeVecMockRecorder struct {
// contains filtered or unexported fields
}
MockIGaugeVecMockRecorder is the mock recorder for MockIGaugeVec.
func (*MockIGaugeVecMockRecorder) GetMetricWithLabelValues ¶
func (mr *MockIGaugeVecMockRecorder) GetMetricWithLabelValues(lvs ...any) *gomock.Call
GetMetricWithLabelValues indicates an expected call of GetMetricWithLabelValues.
func (*MockIGaugeVecMockRecorder) WithLabelValues ¶
func (mr *MockIGaugeVecMockRecorder) WithLabelValues(lvs ...any) *gomock.Call
WithLabelValues indicates an expected call of WithLabelValues.
type MockIHistogramVec ¶
type MockIHistogramVec struct {
// contains filtered or unexported fields
}
MockIHistogramVec is a mock of IHistogramVec interface.
func NewMockIHistogramVec ¶
func NewMockIHistogramVec(ctrl *gomock.Controller) *MockIHistogramVec
NewMockIHistogramVec creates a new mock instance.
func (*MockIHistogramVec) EXPECT ¶
func (m *MockIHistogramVec) EXPECT() *MockIHistogramVecMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIHistogramVec) Observe ¶
func (m *MockIHistogramVec) Observe(arg0 float64)
Observe mocks base method.
func (*MockIHistogramVec) Write ¶
func (m *MockIHistogramVec) Write(arg0 *io_prometheus_client.Metric) error
Write mocks base method.
type MockIHistogramVecMockRecorder ¶
type MockIHistogramVecMockRecorder struct {
// contains filtered or unexported fields
}
MockIHistogramVecMockRecorder is the mock recorder for MockIHistogramVec.