Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (24 sloc) 776 Bytes
package provider
import (
type expvarProvider struct{}
// NewExpvarProvider returns a Provider that produces expvar metrics.
func NewExpvarProvider() Provider {
return expvarProvider{}
// NewCounter implements Provider.
func (p expvarProvider) NewCounter(name string) metrics.Counter {
return expvar.NewCounter(name)
// NewGauge implements Provider.
func (p expvarProvider) NewGauge(name string) metrics.Gauge {
return expvar.NewGauge(name)
// NewHistogram implements Provider.
func (p expvarProvider) NewHistogram(name string, buckets int) metrics.Histogram {
return expvar.NewHistogram(name, buckets)
// Stop implements Provider, but is a no-op.
func (p expvarProvider) Stop() {}
You can’t perform that action at this time.