Documentation ¶
Index ¶
- type FakeMetrics
- func (m *FakeMetrics) AddSample(key []string, val float32)
- func (m *FakeMetrics) AddSampleWithLabels(key []string, val float32, labels []telemetry.Label)
- func (m *FakeMetrics) AllMetrics() []MetricItem
- func (m *FakeMetrics) EmitKey(key []string, val float32)
- func (m *FakeMetrics) IncrCounter(key []string, val float32)
- func (m *FakeMetrics) IncrCounterWithLabels(key []string, val float32, labels []telemetry.Label)
- func (m *FakeMetrics) MeasureSince(key []string, _ time.Time)
- func (m *FakeMetrics) MeasureSinceWithLabels(key []string, _ time.Time, labels []telemetry.Label)
- func (m *FakeMetrics) Reset()
- func (m *FakeMetrics) SetGauge(key []string, val float32)
- func (m *FakeMetrics) SetGaugeWithLabels(key []string, val float32, labels []telemetry.Label)
- type MetricItem
- type MetricType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeMetrics ¶
type FakeMetrics struct {
// contains filtered or unexported fields
}
func New ¶
func New() *FakeMetrics
func (*FakeMetrics) AddSample ¶
func (m *FakeMetrics) AddSample(key []string, val float32)
func (*FakeMetrics) AddSampleWithLabels ¶
func (m *FakeMetrics) AddSampleWithLabels(key []string, val float32, labels []telemetry.Label)
func (*FakeMetrics) AllMetrics ¶
func (m *FakeMetrics) AllMetrics() []MetricItem
AllMetrics return all collected metrics
func (*FakeMetrics) EmitKey ¶
func (m *FakeMetrics) EmitKey(key []string, val float32)
func (*FakeMetrics) IncrCounter ¶
func (m *FakeMetrics) IncrCounter(key []string, val float32)
func (*FakeMetrics) IncrCounterWithLabels ¶
func (m *FakeMetrics) IncrCounterWithLabels(key []string, val float32, labels []telemetry.Label)
func (*FakeMetrics) MeasureSince ¶
func (m *FakeMetrics) MeasureSince(key []string, _ time.Time)
func (*FakeMetrics) MeasureSinceWithLabels ¶
func (*FakeMetrics) Reset ¶
func (m *FakeMetrics) Reset()
func (*FakeMetrics) SetGauge ¶
func (m *FakeMetrics) SetGauge(key []string, val float32)
func (*FakeMetrics) SetGaugeWithLabels ¶
func (m *FakeMetrics) SetGaugeWithLabels(key []string, val float32, labels []telemetry.Label)
type MetricItem ¶
type MetricType ¶
type MetricType int
const ( SetGaugeType MetricType = iota SetGaugeWithLabelsType EmitKeyType IncrCounterType IncrCounterWithLabelsType AddSampleType AddSampleWithLabelsType MeasureSinceType MeasureSinceWithLabelsType )
Click to show internal directories.
Click to hide internal directories.