Versions in this module Expand all Collapse all v1 v1.8.1 Jun 20, 2018 Changes in this version + var DefaultRuntimeInterval = 30 * time.Second + var Null = &nullStats + func Close(ctx context.Context) error + func Dec(ctx context.Context, name string, value int64, rate float32, ...) error + func Gauge(ctx context.Context, name string, value float64, rate float32, ...) error + func Inc(ctx context.Context, name string, value int64, rate float32, ...) error + func Runtime(stats Stats) + func RuntimeEvery(stats Stats, t time.Duration) + func Timing(ctx context.Context, name string, value time.Duration, rate float32, ...) error + func WithStats(ctx context.Context, stats Stats) context.Context + type BufferedStatsd struct + func NewBufferedStatsd(addr, prefix string, opts ...BufferedStatsdFunc) (*BufferedStatsd, error) + func (s BufferedStatsd) Close() error + func (s BufferedStatsd) Dec(name string, value int64, rate float32, tags map[string]string) error + func (s BufferedStatsd) Gauge(name string, value float64, rate float32, tags map[string]string) error + func (s BufferedStatsd) Inc(name string, value int64, rate float32, tags map[string]string) error + func (s BufferedStatsd) Timing(name string, value time.Duration, rate float32, tags map[string]string) error + type BufferedStatsdFunc func(*BufferedStatsd) + func WithFlushBytes(bytes int) BufferedStatsdFunc + func WithFlushInterval(interval time.Duration) BufferedStatsdFunc + type L2met struct + func (s L2met) Close() error + func (s L2met) Dec(name string, value int64, rate float32, tags map[string]string) error + func (s L2met) Gauge(name string, value float64, rate float32, tags map[string]string) error + func (s L2met) Inc(name string, value int64, rate float32, tags map[string]string) error + func (s L2met) Timing(name string, value time.Duration, rate float32, tags map[string]string) error + type Stats interface + Dec func(name string, value int64, rate float32, tags map[string]string) error + Gauge func(name string, value float64, rate float32, tags map[string]string) error + Inc func(name string, value int64, rate float32, tags map[string]string) error + Timing func(name string, value time.Duration, rate float32, tags map[string]string) error + func FromContext(ctx context.Context) (Stats, bool) + func NewL2met(l log.Logger, prefix string) Stats + func NewStatsd(addr, prefix string) (Stats, error) + type Statsd struct + func (s Statsd) Close() error + func (s Statsd) Dec(name string, value int64, rate float32, tags map[string]string) error + func (s Statsd) Gauge(name string, value float64, rate float32, tags map[string]string) error + func (s Statsd) Inc(name string, value int64, rate float32, tags map[string]string) error + func (s Statsd) Timing(name string, value time.Duration, rate float32, tags map[string]string) error + type TaggedStats struct + func NewTaggedStats(stats Stats, tags map[string]string) *TaggedStats + func (s TaggedStats) Close() error + func (s TaggedStats) Dec(name string, value int64, rate float32, tags map[string]string) error + func (s TaggedStats) Gauge(name string, value float64, rate float32, tags map[string]string) error + func (s TaggedStats) Inc(name string, value int64, rate float32, tags map[string]string) error + func (s TaggedStats) Timing(name string, value time.Duration, rate float32, tags map[string]string) error + type Tags map[string]string + func (t Tags) Merge(t2 Tags) Tags + func (t Tags) With(key, value string) Tags + type Timer interface + Done func() + Start func() + func Time(ctx context.Context, name string, rate float32, tags map[string]string) Timer Incompatible versions in this module v2.5.0+incompatible Oct 19, 2018 v2.4.0+incompatible Oct 2, 2018 Other modules containing this package github.com/msales/pkg/v3 github.com/msales/pkg/v4