Documentation
¶
Overview ¶
Package vm queries VictoriaMetrics (or any Prometheus-compatible API) for instant vectors.
Index ¶
- func BasicAuth(next http.RoundTripper, username, password string) http.RoundTripper
- type Client
- func (c *Client) Query(ctx context.Context, query string) ([]Sample, error)
- func (c *Client) QueryAt(ctx context.Context, query string, t time.Time) ([]Sample, error)
- func (c *Client) QueryRange(ctx context.Context, query string, start, end time.Time, step time.Duration) ([]Series, error)
- func (c *Client) QuerySamplesAt(ctx context.Context, selector string, end time.Time) ([]Series, error)
- type Point
- type Sample
- type Series
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasicAuth ¶
func BasicAuth(next http.RoundTripper, username, password string) http.RoundTripper
BasicAuth sends username and password with every request through next (http.DefaultTransport when nil), in place of any Authorization the request had: the credentials VictoriaMetrics' -httpAuth.* flags ask for. With no username it is next itself.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client queries one server.
func (*Client) QueryRange ¶
func (c *Client) QueryRange(ctx context.Context, query string, start, end time.Time, step time.Duration) ([]Series, error)
QueryRange evaluates a range query from start to end, every step.
func (*Client) QuerySamplesAt ¶
func (c *Client) QuerySamplesAt(ctx context.Context, selector string, end time.Time) ([]Series, error)
QuerySamplesAt evaluates a range selector once and returns the original samples rather than one calculated value per step. Incomplete or malformed data cannot support an evidence check.