...

Package convert

import "github.com/go-kit/kit/metrics/internal/convert"
Overview
Index

Overview ▾

Package convert provides a way to use Counters, Histograms, or Gauges as one of the other types

func NewCounterAsGauge

func NewCounterAsGauge(c metrics.Counter) metrics.Gauge

NewCounterAsGauge returns a Gauge that actually writes the value on an underlying Counter

func NewCounterAsHistogram

func NewCounterAsHistogram(c metrics.Counter) metrics.Histogram

NewCounterAsHistogram returns a Histogram that actually writes the value on an underlying Counter

func NewGaugeAsCounter

func NewGaugeAsCounter(g metrics.Gauge) metrics.Counter

NewGaugeAsCounter returns a Counter that actually writes the value on an underlying Gauge

func NewGaugeAsHistogram

func NewGaugeAsHistogram(g metrics.Gauge) metrics.Histogram

NewGaugeAsHistogram returns a Histogram that actually writes the value on an underlying Gauge

func NewHistogramAsCounter

func NewHistogramAsCounter(h metrics.Histogram) metrics.Counter

NewHistogramAsCounter returns a Counter that actually writes the value on an underlying Histogram

func NewHistogramAsGauge

func NewHistogramAsGauge(h metrics.Histogram) metrics.Gauge

NewHistogramAsGauge returns a Gauge that actually writes the value on an underlying Histogram