Import path:
gitlab.soludian.com/soludian/fountain/libs/metrics/expvar
expvar
import "gitlab.soludian.com/soludian/fountain/libs/metrics/expvar"Package expvar provides expvar backends for metrics. Label values are not supported.
Index
Variables
var KPackageName = "expvar"type Counter
Counter implements the counter metric with an expvar float. Label values are not supported.
type Counter struct {
// contains filtered or unexported fields
}func NewCounter
func NewCounter(name string) *CounterNewCounter creates an expvar Float with the given name, and returns an object that implements the Counter interface.
func (*Counter) Add
func (c *Counter) Add(delta float64)Add implements Counter.
func (*Counter) With
func (c *Counter) With(labelValues ...string) metrics.CounterWith is a no-op.
type Gauge
Gauge implements the gauge metric with an expvar float. Label values are not supported.
type Gauge struct {
// contains filtered or unexported fields
}func NewGauge
func NewGauge(name string) *GaugeNewGauge creates an expvar Float with the given name, and returns an object that implements the Gauge interface.
func (*Gauge) Add
func (g *Gauge) Add(delta float64)Add implements metrics.Gauge.
func (*Gauge) Set
func (g *Gauge) Set(value float64)Set implements Gauge.
func (*Gauge) With
func (g *Gauge) With(labelValues ...string) metrics.GaugeWith is a no-op.
type Histogram
Histogram implements the histogram metric with a combination of the generic Histogram object and several expvar Floats, one for each of the 50th, 90th, 95th, and 99th quantiles of observed values, with the quantile attached to the name as a suffix. Label values are not supported.
type Histogram struct {
// contains filtered or unexported fields
}func NewHistogram
func NewHistogram(name string, buckets int) *HistogramNewHistogram returns a Histogram object with the given name and number of buckets in the underlying histogram object. 50 is a good default number of buckets.
func (*Histogram) Observe
func (h *Histogram) Observe(value float64)Observe implements Histogram.
func (*Histogram) With
func (h *Histogram) With(labelValues ...string) metrics.HistogramWith is a no-op.
Generated by gomarkdoc