Versions in this module Expand all Collapse all v1 v1.19.6 Sep 4, 2026 v1.19.5 Aug 14, 2026 Changes in this version + type GaugeDefinition struct + Expected float64 + Labels map[string]string + Name string + type MetricsClient struct + func NewMetricsClient(httpClient client.HTTP, options ...Option) *MetricsClient + func (c *MetricsClient) Fetch(ctx context.Context) (*Snapshot, error) + func (c *MetricsClient) WaitForGauge(ctx context.Context, definition GaugeDefinition, pollInterval time.Duration) error + func (c *MetricsClient) WaitForSnapshot(ctx context.Context, pollInterval time.Duration, check func(*Snapshot) error) (*Snapshot, error) + type Option func(*MetricsClient) + func WithFetchTimeout(timeout time.Duration) Option + func WithWaitTimeout(timeout time.Duration) Option + type Snapshot struct + func (s *Snapshot) Gauge(name string, labels map[string]string) (float64, error) + func (s *Snapshot) GaugeSum(name string, labels map[string]string) (float64, error) + func (s *Snapshot) HistogramCount(name string, labels map[string]string) (uint64, error) + func (s *Snapshot) Payload() string + type SnapshotCheck func(*Snapshot) error + func GaugeAtLeast(name string, labels map[string]string, minimum float64) SnapshotCheck + func GaugeEquals(name string, labels map[string]string, expected float64) SnapshotCheck + func GaugeSumEquals(name string, labels map[string]string, expected float64) SnapshotCheck + func HistogramCountAtLeast(name string, labels map[string]string, minimum uint64) SnapshotCheck