prom

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSelectorValid

func IsSelectorValid(selector string) bool

Types

type Client

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

func NewClient

func NewClient(config ClientConfig) (*Client, error)

func (*Client) GetStep

func (c *Client) GetStep(from, to timeseries.Time) (timeseries.Duration, error)

func (*Client) Ping

func (c *Client) Ping(ctx context.Context) error

func (*Client) Proxy

func (c *Client) Proxy(r *http.Request, w http.ResponseWriter)

func (*Client) QueryRange

func (c *Client) QueryRange(ctx context.Context, query string, from, to timeseries.Time, step timeseries.Duration) ([]model.MetricValues, error)

type ClientConfig

type ClientConfig struct {
	Url           string
	BasicAuth     *utils.BasicAuth
	TlsSkipVerify bool
	ExtraSelector string
	CustomHeaders []utils.Header
	Step          timeseries.Duration
	Transport     *http.Transport
}

func NewClientConfig

func NewClientConfig(url string, step timeseries.Duration) ClientConfig

type Querier

type Querier interface {
	QueryRange(ctx context.Context, query string, from, to timeseries.Time, step timeseries.Duration) ([]model.MetricValues, error)
	GetStep(from, to timeseries.Time) (timeseries.Duration, error)
}

Jump to

Keyboard shortcuts

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