4 "github.com/go-kit/kit/metrics"
5 "github.com/go-kit/kit/metrics/influx"
8 type influxProvider struct {
13 // NewInfluxProvider takes the given Influx object and stop func, and returns
14 // a Provider that produces Influx metrics.
15 func NewInfluxProvider(in *influx.Influx, stop func()) Provider {
16 return &influxProvider{
22 // NewCounter implements Provider. Per-metric tags are not supported.
23 func (p *influxProvider) NewCounter(name string) metrics.Counter {
24 return p.in.NewCounter(name)
27 // NewGauge implements Provider. Per-metric tags are not supported.
28 func (p *influxProvider) NewGauge(name string) metrics.Gauge {
29 return p.in.NewGauge(name)
32 // NewHistogram implements Provider. Per-metric tags are not supported.
33 func (p *influxProvider) NewHistogram(name string, buckets int) metrics.Histogram {
34 return p.in.NewHistogram(name)
37 // Stop implements Provider, invoking the stop function passed at construction.
38 func (p *influxProvider) Stop() {