Versions in this module Expand all Collapse all v0 v0.11.0 Sep 2, 2025 v0.10.2 Aug 7, 2025 v0.10.1 Jul 22, 2025 v0.10.0 Jul 20, 2025 Changes in this version + var ErrFailedTypeAssertion = errors.New("failed type assertion") + var ErrMissingConfig = errors.New("global config not found in client config") + var ErrMissingData = errors.New("missing data in client response") + type Client struct + API v1.API + Logger *slog.Logger + URL *url.URL + func New(webURL string, config config_util.HTTPClientConfig, logger *slog.Logger) (*Client, error) + func (t *Client) Available() bool + func (t *Client) Delete(ctx context.Context, startTime time.Time, endTime time.Time, matchers []string) error + func (t *Client) Labels(ctx context.Context, matchers []string, start time.Time, end time.Time) ([]string, error) + func (t *Client) Ping() error + func (t *Client) Query(ctx context.Context, query string, queryTime time.Time) (Metric, error) + func (t *Client) RangeQuery(ctx context.Context, query string, startTime time.Time, endTime time.Time, ...) (model.Matrix, error) + func (t *Client) Series(ctx context.Context, matchers []string, start time.Time, end time.Time) ([]model.LabelSet, error) + func (t *Client) Settings(ctx context.Context) *Settings + func (t *Client) String() string + type Config struct + Global struct{ ... } + type Data struct + Result []Result + ResultType string + type Metric map[string]float64 + type Response struct + Data T + Error string + ErrorType string + Status string + Warnings []string + type Result struct + Metric map[string]string + Value any + Values []any + type Settings struct + EvaluationInterval time.Duration + QueryLookbackDelta time.Duration + QueryMaxSamples int64 + QueryTimeout time.Duration + RateInterval time.Duration + RetentionPeriod time.Duration + ScrapeInterval time.Duration