Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricsRecorder ¶
type MetricsRecorder interface {
IncCounter(name string, labels Labels)
ObserveHistogram(name string, value float64, labels Labels)
}
MetricsRecorder captures counters and histograms.
type Middleware ¶
type Middleware struct {
M MetricsRecorder
}
Middleware instruments HTTP traffic using a provided recorder.
type NoopMetrics ¶
type NoopMetrics struct{}
NoopMetrics is the default. Swap later for Prometheus, etc.
func (NoopMetrics) IncCounter ¶
func (NoopMetrics) IncCounter(_ string, _ Labels)
func (NoopMetrics) ObserveHistogram ¶
func (NoopMetrics) ObserveHistogram(_ string, _ float64, _ Labels)
Click to show internal directories.
Click to hide internal directories.