testhelpers

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Intp

func Intp(i int) *int

Intp returns a pointer to the given integer value.

func MustNewRequest

func MustNewRequest(method, urlStr string, body io.Reader) *http.Request

MustNewRequest creates a new http get request or panics if it can't

func MustParseURL added in v1.4.0

func MustParseURL(rawURL string) *url.URL

MustParseURL parses a URL or panics if it can't

func Stringp added in v1.4.0

func Stringp(s string) *string

Stringp returns a pointer to the given string value.

Types

type CollectingCounter added in v1.6.0

type CollectingCounter struct {
	CounterValue    float64
	LastLabelValues []string
}

CollectingCounter is a metrics.Counter implementation that enables access to the CounterValue and LastLabelValues.

func (*CollectingCounter) Add added in v1.6.0

func (c *CollectingCounter) Add(delta float64)

Add is there to satisfy the metrics.Counter interface.

func (*CollectingCounter) With added in v1.6.0

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

With is there to satisfy the metrics.Counter interface.

type CollectingGauge added in v1.6.0

type CollectingGauge struct {
	GaugeValue      float64
	LastLabelValues []string
}

CollectingGauge is a metrics.Gauge implementation that enables access to the GaugeValue and LastLabelValues.

func (*CollectingGauge) Add added in v1.6.0

func (g *CollectingGauge) Add(delta float64)

Add is there to satisfy the metrics.Gauge interface.

func (*CollectingGauge) Set added in v1.6.0

func (g *CollectingGauge) Set(value float64)

Set is there to satisfy the metrics.Gauge interface.

func (*CollectingGauge) With added in v1.6.0

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

With is there to satisfy the metrics.Gauge interface.

type CollectingHealthCheckMetrics added in v1.6.0

type CollectingHealthCheckMetrics struct {
	Gauge *CollectingGauge
}

CollectingHealthCheckMetrics can be used for testing the Metrics instrumentation of the HealthCheck package.

func NewCollectingHealthCheckMetrics added in v1.6.0

func NewCollectingHealthCheckMetrics() *CollectingHealthCheckMetrics

NewCollectingHealthCheckMetrics creates a new CollectingHealthCheckMetrics instance.

func (*CollectingHealthCheckMetrics) BackendServerUpGauge added in v1.6.0

func (m *CollectingHealthCheckMetrics) BackendServerUpGauge() metrics.Gauge

BackendServerUpGauge is there to satisfy the healthcheck.metricsRegistry interface.

Jump to

Keyboard shortcuts

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