Versions in this module Expand all Collapse all v1 v1.4.0 Nov 21, 2020 v1.3.1 Nov 29, 2019 Changes in this version + const GaugeType + const IncType + const TimingType + var DefaultHeartbeatInterval = time.Second + var DefaultRuntimeInterval = 30 * time.Second + var Null = &nullStatter + func Close(sable Statable) error + func Gauge(sable Statable, name string, value float64, rate float32, tags ...string) + func Group(sable Statable, prefix string, fn func(s Statter)) + func Heartbeat(stats Statter) + func HeartbeatEvery(stats Statter, t time.Duration) + func HeartbeatFromStatable(sable Statable, t time.Duration) + func Inc(sable Statable, name string, value int64, rate float32, tags ...string) + func Runtime(stats Statter) + func RuntimeEvery(s Statter, t time.Duration) + func RuntimeFromStatable(sable Statable, t time.Duration) + func Timing(sable Statable, name string, value time.Duration, rate float32, tags ...string) + type AggregateFunc func(*AggregateStatter) + func WithCounterAggregator(a Aggregator) AggregateFunc + func WithGaugeAggregator(a Aggregator) AggregateFunc + func WithTimingAggregator(a Aggregator) AggregateFunc + type AggregateStatter struct + func NewAggregateStatter(stats Statter, interval time.Duration, opts ...AggregateFunc) *AggregateStatter + func (s *AggregateStatter) Close() error + func (s *AggregateStatter) Gauge(name string, value float64, rate float32, tags ...string) + func (s *AggregateStatter) Inc(name string, value int64, rate float32, tags ...string) + func (s *AggregateStatter) Timing(name string, value time.Duration, rate float32, tags ...string) + func (s *AggregateStatter) Unwrap() Statter + type Aggregator interface + Aggregate func(Metric) + Flush func(Statter) + type Metric struct + DurVal time.Duration + FloatVal float64 + Hash string + IntVal int64 + Name string + Rate float32 + Tags []string + Type int + type MockStatable struct + func NewMockStatable(s Statter) *MockStatable + func (m *MockStatable) Statter() Statter + type Statable interface + Statter func() Statter + type Statter interface + Gauge func(name string, value float64, rate float32, tags ...string) + Inc func(name string, value int64, rate float32, tags ...string) + Timing func(name string, value time.Duration, rate float32, tags ...string) + func Unwrap(stats Statter) Statter + type TaggedStatter struct + func NewTaggedStatter(stats Statter, tags ...string) *TaggedStatter + func (s TaggedStatter) Close() error + func (s TaggedStatter) Gauge(name string, value float64, rate float32, tags ...string) + func (s TaggedStatter) Inc(name string, value int64, rate float32, tags ...string) + func (s TaggedStatter) Timing(name string, value time.Duration, rate float32, tags ...string) + func (s TaggedStatter) Unwrap() Statter + type Timer interface + Done func() + Start func() + func Time(sable Statable, name string, rate float32, tags ...string) Timer + type Wrapper interface + Unwrap func() Statter