Versions in this module Expand all Collapse all v1 v1.1.5 Jan 29, 2018 Changes in this version + const MaxLatency + const TestSampleInterval + var DefaultTimeScales = []TimeScale + var Scale10M = TimeScale + var Scale1H = TimeScale + var Scale1M = TimeScale + func TestingSetNow(f func() time.Time) func() + type Counter struct + func NewCounter(metadata Metadata) *Counter + func (c *Counter) GetType() *prometheusgo.MetricType + func (c *Counter) Inspect(f func(interface{})) + func (c *Counter) MarshalJSON() ([]byte, error) + func (c *Counter) ToPrometheusMetric() *prometheusgo.Metric + type CounterWithRates struct + Rates map[TimeScale]*Rate + func NewCounterWithRates(metadata Metadata) *CounterWithRates + func (c *CounterWithRates) Inc(v int64) + type Gauge struct + func NewFunctionalGauge(metadata Metadata, f func() int64) *Gauge + func NewGauge(metadata Metadata) *Gauge + func (g *Gauge) Dec(i int64) + func (g *Gauge) GetType() *prometheusgo.MetricType + func (g *Gauge) Inc(i int64) + func (g *Gauge) Inspect(f func(interface{})) + func (g *Gauge) MarshalJSON() ([]byte, error) + func (g *Gauge) Snapshot() metrics.Gauge + func (g *Gauge) ToPrometheusMetric() *prometheusgo.Metric + func (g *Gauge) Update(v int64) + func (g *Gauge) Value() int64 + type GaugeFloat64 struct + func NewGaugeFloat64(metadata Metadata) *GaugeFloat64 + func (g *GaugeFloat64) GetType() *prometheusgo.MetricType + func (g *GaugeFloat64) Inspect(f func(interface{})) + func (g *GaugeFloat64) MarshalJSON() ([]byte, error) + func (g *GaugeFloat64) ToPrometheusMetric() *prometheusgo.Metric + type Histogram struct + func NewHistogram(metadata Metadata, duration time.Duration, maxVal int64, sigFigs int) *Histogram + func NewLatency(metadata Metadata, histogramWindow time.Duration) *Histogram + func (h *Histogram) GetType() *prometheusgo.MetricType + func (h *Histogram) Inspect(f func(interface{})) + func (h *Histogram) Min() int64 + func (h *Histogram) RecordValue(v int64) + func (h *Histogram) Snapshot() *hdrhistogram.Histogram + func (h *Histogram) ToPrometheusMetric() *prometheusgo.Metric + func (h *Histogram) TotalCount() int64 + func (h *Histogram) Windowed() (*hdrhistogram.Histogram, time.Duration) + type Iterable interface + GetHelp func() string + GetName func() string + Inspect func(func(interface{})) + type Metadata struct + Help string + Name string + func (m *Metadata) AddLabel(name, value string) + func (m *Metadata) GetHelp() string + func (m *Metadata) GetLabels() []*prometheusgo.LabelPair + func (m *Metadata) GetName() string + type PrometheusExportable interface + GetHelp func() string + GetLabels func() []*prometheusgo.LabelPair + GetName func() string + GetType func() *prometheusgo.MetricType + ToPrometheusMetric func() *prometheusgo.Metric + type PrometheusExporter struct + func MakePrometheusExporter() PrometheusExporter + func (pm *PrometheusExporter) PrintAsText(w io.Writer) error + func (pm *PrometheusExporter) ScrapeRegistry(registry *Registry) + type Rate struct + func NewRate(timescale time.Duration) *Rate + func (e *Rate) Add(v float64) + func (e *Rate) Value() float64 + type Registry struct + func NewRegistry() *Registry + func (r *Registry) AddLabel(name, value string) + func (r *Registry) AddMetric(metric Iterable) + func (r *Registry) AddMetricStruct(metricStruct interface{}) + func (r *Registry) Each(f func(name string, val interface{})) + func (r *Registry) MarshalJSON() ([]byte, error) + type Struct interface + MetricStruct func() + type TimeScale struct