stub

package
v0.12.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter struct {
	sync.Mutex
	LabelValues  []string
	CounterValue float64
}

Counter is a stub implementation of the go-kit metrics.Counter interface.

func (*Counter) Add

func (c *Counter) Add(delta float64)

Add adds the given value to the counter.

func (*Counter) With

func (c *Counter) With(labelValues ...string) metrics.Counter

With returns a new Counter with the given label values.

type Gauge

type Gauge struct {
	sync.Mutex
	LabelValues []string
	GaugeValue  float64
}

Gauge is a stub implementation of the go-kit metrics.Gauge interface.

func (*Gauge) Add

func (g *Gauge) Add(delta float64)

Add adds the given value to the gauge.

func (*Gauge) Set

func (g *Gauge) Set(value float64)

Set sets the gauge value.

func (*Gauge) With

func (g *Gauge) With(labelValues ...string) metrics.Gauge

With returns a new Gauge with the given label values.

type Histogram

type Histogram struct {
	sync.Mutex
	LabelValues   LabelValues
	ObservedValue float64
}

Histogram is a stub implementation of the go-kit metrics.Histogram interface.

func (*Histogram) Observe

func (h *Histogram) Observe(value float64)

Observe records the given value.

func (*Histogram) With

func (h *Histogram) With(labelValues ...string) metrics.Histogram

With returns a new Histogram with the given label values.

type LabelValues added in v0.12.0

type LabelValues []string

LabelValues contains the set of labels and their corresponding values.

func (LabelValues) Label added in v0.12.0

func (l LabelValues) Label(name string) string

Label returns the label of given name.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL