client

package
v0.0.0-kmdagger3 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTransportOptions

func CreateTransportOptions(settings backend.DataSourceInstanceSettings, cfg *setting.Cfg, logger log.Logger) (*sdkhttpclient.Options, error)

CreateTransportOptions creates options for the http client. Probably should be shared and should not live in the buffered package.

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) (*http.Response, error)

func (*Client) QueryInstant

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

func (*Client) QueryRange

func (c *Client) QueryRange(ctx context.Context, q *models.Query) (*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