Documentation ¶
Index ¶
- func CreateTransportOptions(settings backend.DataSourceInstanceSettings, cfg *setting.Cfg, ...) (*sdkhttpclient.Options, error)
- type Client
- func (c *Client) QueryExemplars(ctx context.Context, q *models.Query) (*http.Response, error)
- func (c *Client) QueryInstant(ctx context.Context, q *models.Query) (*http.Response, error)
- func (c *Client) QueryRange(ctx context.Context, q *models.Query) (*http.Response, error)
- func (c *Client) QueryResource(ctx context.Context, req *backend.CallResourceRequest) (*http.Response, error)
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 (*Client) QueryExemplars ¶
func (*Client) QueryInstant ¶
func (*Client) QueryRange ¶
func (*Client) QueryResource ¶
Click to show internal directories.
Click to hide internal directories.