Documentation
¶
Index ¶
- type Sink
- func (s *Sink) AddSample(key []string, val float32)
- func (s *Sink) AddSampleWithLabels(key []string, val float32, labels []metrics.Label)
- func (s *Sink) EmitKey(key []string, val float32)
- func (s *Sink) IncrCounter(key []string, val float32)
- func (s *Sink) IncrCounterWithLabels(key []string, val float32, labels []metrics.Label)
- func (s *Sink) SetGauge(key []string, val float32)
- func (s *Sink) SetGaugeWithLabels(key []string, val float32, labels []metrics.Label)
- func (s *Sink) SetSink(newSink metrics.MetricSink)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sink ¶
type Sink struct {
// contains filtered or unexported fields
}
Sink is a temporary sink that caches metrics until a real sink is set in SetSink. it implements the metrics.MetricSink interface
func (*Sink) AddSampleWithLabels ¶
AddSampleWithLabels sends metrics to the real sink otherwise caches them
func (*Sink) IncrCounter ¶
IncrCounter defaults to IncrCounterWithLabels
func (*Sink) IncrCounterWithLabels ¶
IncrCounterWithLabels sends metrics to the real sink otherwise caches them
func (*Sink) SetGaugeWithLabels ¶
SetGaugeWithLabels sends metrics to the real sink otherwise caches them
func (*Sink) SetSink ¶
func (s *Sink) SetSink(newSink metrics.MetricSink)
SetSink takes a sink and will ensure that the sink sets the value and then starts forwarding metrics on to the realSink once called. It will also replay all the cached metrics and send them to the realSink
Click to show internal directories.
Click to hide internal directories.