Documentation
¶
Index ¶
- type MetricsCollector
- type NoOpMetricsCollector
- func (c *NoOpMetricsCollector) IncrementCounter(name string, labels ...string)
- func (c *NoOpMetricsCollector) RecordGauge(name string, value float64, labels ...string)
- func (c *NoOpMetricsCollector) RecordHistogram(name string, value float64, labels ...string)
- func (c *NoOpMetricsCollector) StartTimer(name string) server.Timer
- type Timer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricsCollector ¶
type MetricsCollector interface {
IncrementCounter(name string, labels ...string)
RecordHistogram(name string, value float64, labels ...string)
RecordGauge(name string, value float64, labels ...string)
StartTimer(name string) Timer
}
MetricsCollector defines the interface for collecting metrics. This should match the server.MetricsCollector interface.
type NoOpMetricsCollector ¶
type NoOpMetricsCollector struct{}
NoOpMetricsCollector implements the server.MetricsCollector interface with no operations. It will be used in tests where metrics collection is not the focus. server.MetricsCollector expects:
IncrementCounter(name string, labels ...string) RecordHistogram(name string, value float64, labels ...string) RecordGauge(name string, value float64, labels ...string) StartTimer(name string) server.Timer
func NewNoOpMetricsCollector ¶
func NewNoOpMetricsCollector() *NoOpMetricsCollector
NewNoOpMetricsCollector creates a new NoOpMetricsCollector.
func (*NoOpMetricsCollector) IncrementCounter ¶
func (c *NoOpMetricsCollector) IncrementCounter(name string, labels ...string)
IncrementCounter does nothing.
func (*NoOpMetricsCollector) RecordGauge ¶
func (c *NoOpMetricsCollector) RecordGauge(name string, value float64, labels ...string)
RecordGauge does nothing.
func (*NoOpMetricsCollector) RecordHistogram ¶
func (c *NoOpMetricsCollector) RecordHistogram(name string, value float64, labels ...string)
RecordHistogram does nothing.
func (*NoOpMetricsCollector) StartTimer ¶
func (c *NoOpMetricsCollector) StartTimer(name string) server.Timer
StartTimer returns a no-op timer that satisfies server.Timer.
Click to show internal directories.
Click to hide internal directories.