testtarget

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestTarget

type TestTarget struct {
	// contains filtered or unexported fields
}

TestTarget is a test target for prometheus metrics that exposes the metrics from provided registry via HTTP. It must be closed after use using Close method.

func NewTestTarget

func NewTestTarget() *TestTarget

func (*TestTarget) AddCounter

func (t *TestTarget) AddCounter(opts prometheus.CounterOpts) prometheus.Counter

func (*TestTarget) AddGauge

func (t *TestTarget) AddGauge(opts prometheus.GaugeOpts) prometheus.Gauge

func (*TestTarget) AddHistogram

func (t *TestTarget) AddHistogram(opts prometheus.HistogramOpts) prometheus.Histogram

func (*TestTarget) Close

func (t *TestTarget) Close()

func (*TestTarget) Registry

func (t *TestTarget) Registry() *prometheus.Registry

func (*TestTarget) Target

func (t *TestTarget) Target() discovery.Target

func (*TestTarget) URL

func (t *TestTarget) URL() string

Jump to

Keyboard shortcuts

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