promtest

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 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 Config

type Config struct {
	Version  string
	Metadata MetadataMap
}

type FakePrometheus

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

func NewFakePrometheus

func NewFakePrometheus(cfg Config) *FakePrometheus

func (*FakePrometheus) ReadyConfig

func (fp *FakePrometheus) ReadyConfig() config.PromReady

func (*FakePrometheus) ServeMux

func (fp *FakePrometheus) ServeMux() *http.ServeMux

func (*FakePrometheus) SetIntervals

func (fp *FakePrometheus) SetIntervals(is ...time.Duration)

func (*FakePrometheus) SetPromConfigYaml

func (fp *FakePrometheus) SetPromConfigYaml(config string)

func (*FakePrometheus) SetReady

func (fp *FakePrometheus) SetReady(r bool)

func (*FakePrometheus) SetSegment

func (fp *FakePrometheus) SetSegment(s int)

func (*FakePrometheus) Test

func (fp *FakePrometheus) Test() *url.URL

type MetadataMap

type MetadataMap map[string]*config.MetadataEntry

MetadataMap implements a MetadataGetter for exact matches of "job/instance/metric" inputs.

func (MetadataMap) Get

func (m MetadataMap) Get(ctx context.Context, job, instance, metric string) (*config.MetadataEntry, error)

Jump to

Keyboard shortcuts

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