monitortest

package
v0.0.0-...-dd1a744 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtLeast

func AtLeast(want float64) func(any) error

func Buckets

func Buckets(count int) func(any) error

Buckets asserts a distribution has the number of buckets

func Distribution

func Distribution(count uint64, sum float64) func(any) error

func DoesNotExist

func DoesNotExist(any) error

func Exactly

func Exactly(v float64) func(any) error

func TestRegistry

func TestRegistry(t test.Failer) prometheus.Gatherer

Types

type Compare

type Compare func(any) error

type Metric

type Metric struct {
	Name   string
	Labels map[string]string
	Value  string
}

type MetricsTest

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

func New

func New(t test.Failer) *MetricsTest

func (*MetricsTest) Assert

func (m *MetricsTest) Assert(name string, tags map[string]string, compare Compare, opts ...retry.Option)

func (*MetricsTest) Dump

func (m *MetricsTest) Dump()

func (*MetricsTest) Metrics

func (m *MetricsTest) Metrics() []Metric

Metrics returns the full list of known metrics. Usually Assert should be used

Jump to

Keyboard shortcuts

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