Documentation ¶
Index ¶
- type TestTarget
- func (t *TestTarget) AddCounter(opts prometheus.CounterOpts) prometheus.Counter
- func (t *TestTarget) AddGauge(opts prometheus.GaugeOpts) prometheus.Gauge
- func (t *TestTarget) AddHistogram(opts prometheus.HistogramOpts) prometheus.Histogram
- func (t *TestTarget) Close()
- func (t *TestTarget) Registry() *prometheus.Registry
- func (t *TestTarget) Target() discovery.Target
- func (t *TestTarget) URL() string
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
Click to show internal directories.
Click to hide internal directories.