Documentation ¶
Index ¶
- Variables
- func Count(name string, value float64, tags Tags) error
- func CreateCounter(name string, labels []string, opts CounterOpts) error
- func CreateGauge(name string, labels []string, opts GaugeOpts) error
- func CreateHistogram(name string, labels []string, opts HistogramOpts) error
- func CreateSummary(name string, labels []string, 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 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(name string, labels []string, opts CounterOpts) error
CreateCounter init a new counter type
func CreateGauge ¶
CreateGauge init a new gauge type
func CreateHistogram ¶
func CreateHistogram(name string, labels []string, opts HistogramOpts) error
CreateHistogram init a new histogram type
func CreateSummary ¶
func CreateSummary(name string, labels []string, 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 ¶
type CounterOpts struct {
Help string
}
CounterOpts is options to create a counter options
type GaugeOpts ¶
type GaugeOpts struct {
Help string
}
GaugeOpts is options to create a gauge collector
type HistogramOpts ¶
HistogramOpts is options to create histogram collector
type Reporter ¶
type Reporter interface { CreateGauge(name string, labels []string, opts GaugeOpts) error CreateCounter(name string, labels []string, opts CounterOpts) error CreateSummary(name string, labels []string, opts SummaryOpts) error CreateHistogram(name string, labels []string, 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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.