Documentation
¶
Overview ¶
package stats provides a set of interfaces to log stats including a no-op implementation that doesn't do anything. This is useful to instrument metrics within open-sourced components.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CounterStat ¶
type CounterStat interface { Inc() Add(float64) }
type StatsFactory ¶
type StatsFactory interface { NewCounter( metric string, tags map[string]string) CounterStat NewGauge( metric string, tags map[string]string) GaugeStat NewSummary( metric string, tags map[string]string) SummaryStat }
var (
NoOpStatsFactory StatsFactory
)
func NewCompositeFactory ¶
func NewCompositeFactory(factories ...StatsFactory) StatsFactory
type SummaryStat ¶
type SummaryStat interface {
Observe(float64)
}
Click to show internal directories.
Click to hide internal directories.