-
Notifications
You must be signed in to change notification settings - Fork 457
/
blackhole.go
21 lines (17 loc) · 915 Bytes
/
blackhole.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package telemetry
import (
"time"
)
// Blackhole implements the Metrics interface, but throws away the metric data
// Useful for satisfying the Metrics interface when testing code which depends on it.
type Blackhole struct{}
var _ Metrics = Blackhole{}
func (Blackhole) SetGauge([]string, float32) {}
func (Blackhole) SetGaugeWithLabels([]string, float32, []Label) {}
func (Blackhole) EmitKey([]string, float32) {}
func (Blackhole) IncrCounter([]string, float32) {}
func (Blackhole) IncrCounterWithLabels([]string, float32, []Label) {}
func (Blackhole) AddSample([]string, float32) {}
func (Blackhole) AddSampleWithLabels([]string, float32, []Label) {}
func (Blackhole) MeasureSince([]string, time.Time) {}
func (Blackhole) MeasureSinceWithLabels([]string, time.Time, []Label) {}