testmetrics

package
v0.9.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestMetrics

type TestMetrics struct {
	Metrics *metrics.Metrics
	// contains filtered or unexported fields
}

TestMetrics provides testing helpers for metrics.

func Start

func Start(ctx context.Context, t *testing.T) (*TestMetrics, error)

Start configures, creates and starts metrics server, returns initialized TestMetrics object.

func (*TestMetrics) FetchContent

func (tm *TestMetrics) FetchContent() (string, error)

FetchContent fetches content from /metrics.

func (*TestMetrics) FetchURL

func (tm *TestMetrics) FetchURL(relurl string) (int, string, error)

FetchURL fetches content from provided relative url.

func (*TestMetrics) Stop

func (tm *TestMetrics) Stop() error

Stop wraps metrics Stop method.

Jump to

Keyboard shortcuts

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