metricstest

package
v1.21.5-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMetricNotFound      = errors.New("metric not found")
	ErrMetricTypeMismatch  = errors.New("metric is not the expected type")
	ErrMetricLabelMismatch = errors.New("metric labels do not match expected labels")
)

Potential errors that the test handler can return trying to find a metric to return.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	metrics.Handler
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(logger log.Logger, clientConfig metrics.ClientConfig) (*Handler, error)

func (*Handler) Snapshot

func (h *Handler) Snapshot() (Snapshot, error)

func (*Handler) Stop

func (*Handler) Stop(log.Logger)

type HistogramBucket added in v1.21.0

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

type Snapshot

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

func (Snapshot) Counter

func (s Snapshot) Counter(name string, tags ...metrics.Tag) (float64, error)

func (Snapshot) Gauge

func (s Snapshot) Gauge(name string, tags ...metrics.Tag) (float64, error)

func (Snapshot) Histogram added in v1.21.0

func (s Snapshot) Histogram(name string, tags ...metrics.Tag) ([]HistogramBucket, error)

func (Snapshot) String

func (s Snapshot) String() string

Jump to

Keyboard shortcuts

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