client

package
v0.0.1-test Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a custom Prometheus client. Reason for this is that Prom Go client serializes response into its own objects, we have to go through them and then serialize again into DataFrame which isn't very efficient. Using custom client we can parse response directly into DataFrame.

func NewClient

func NewClient(d doer, method, baseUrl string) *Client

func (*Client) QueryExemplars

func (c *Client) QueryExemplars(ctx context.Context, q *models.Query, headers http.Header) (*http.Response, error)

func (*Client) QueryInstant

func (c *Client) QueryInstant(ctx context.Context, q *models.Query, headers http.Header) (*http.Response, error)

func (*Client) QueryRange

func (c *Client) QueryRange(ctx context.Context, q *models.Query, headers http.Header) (*http.Response, error)

func (*Client) QueryResource

func (c *Client) QueryResource(ctx context.Context, req *backend.CallResourceRequest) (*http.Response, error)

Jump to

Keyboard shortcuts

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