Documentation
¶
Overview ¶
Package mapsink provides a simple map-based sink for go-metrics. It does not support intervals, only totals since creation.
Index ¶
- type MapSink
- func (s *MapSink) AddSample(key []string, val float32)
- func (s *MapSink) EmitKey(key []string, val float32)
- func (s *MapSink) FlattenKey(parts []string) string
- func (s *MapSink) Get(key string) (float32, bool)
- func (s *MapSink) IncrCounter(key []string, val float32)
- func (s *MapSink) MarshalJSON() ([]byte, error)
- func (s *MapSink) SetGauge(key []string, val float32)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MapSink ¶
MapSink is a simple sink that stores metrics in a map.
func (*MapSink) AddSample ¶
AddSample just adds the sampls to all other samples. It acts like a counter in that regard.
func (*MapSink) FlattenKey ¶
FlattenKey flattens the key for formatting, removes spaces
func (*MapSink) IncrCounter ¶
IncrCounter increments the flattened key by val. If the key does not currently, exist then it is set to val
func (*MapSink) MarshalJSON ¶
MarshalJSON marshals the sinks data into json
Click to show internal directories.
Click to hide internal directories.