Documentation ¶
Index ¶
- Variables
- func Count(name string, value float64, tags Tags) error
- func CreateCounter(opts CounterOpts) error
- func CreateGauge(opts GaugeOpts) error
- func CreateHistogram(opts HistogramOpts) error
- func CreateSummary(opts SummaryOpts) error
- func Gauge(name string, value float64, tags Tags) error
- func Histogram(name string, value float64, tags Tags) error
- func Register(name string, r Factory) (err error)
- func SetDefault(reporter Reporter)
- func Summary(name string, value float64, tags Tags) error
- type Cfg
- type CounterOpts
- type Factory
- type GaugeOpts
- type HistogramOpts
- type Reporter
- type SummaryOpts
- type Tags
Constants ¶
This section is empty.
Variables ¶
View Source
var Name = "metric"
Functions ¶
func CreateCounter ¶
func CreateCounter(opts CounterOpts) error
CreateCounter init a new counter type
func CreateHistogram ¶
func CreateHistogram(opts HistogramOpts) error
CreateHistogram init a new histogram type
func CreateSummary ¶
func CreateSummary(opts SummaryOpts) error
CreateSummary init a new summary type
Types ¶
type Cfg ¶
type Cfg struct {
Driver string `json:"driver"`
}
func GetDefaultCfg ¶
func GetDefaultCfg() Cfg
type CounterOpts ¶
CounterOpts is options to create a counter options
type HistogramOpts ¶
HistogramOpts is options to create histogram collector
type Reporter ¶
type Reporter interface { CreateGauge(opts GaugeOpts) error CreateCounter(opts CounterOpts) error CreateSummary(opts SummaryOpts) error CreateHistogram(opts HistogramOpts) error Count(name string, value float64, tags Tags) error Gauge(name string, value float64, tags Tags) error Histogram(name string, value float64, tags Tags) error Summary(name string, value float64, tags Tags) error }
Reporter is an interface for collecting and instrumenting metrics
type SummaryOpts ¶
SummaryOpts is options to create summary collector
Click to show internal directories.
Click to hide internal directories.