Versions in this module Expand all Collapse all v1 v1.1.2 Apr 22, 2019 Changes in this version + type Client struct + func NewClient(addr string, opts ...ClientOption) *Client + func (c *Client) PromQL(ctx context.Context, query string, opts ...PromQLOption) (*rpc.PromQL_InstantQueryResult, error) + func (c *Client) PromQLRange(ctx context.Context, query string, opts ...PromQLOption) (*rpc.PromQL_RangeQueryResult, error) + type ClientOption interface + func WithHTTPClient(h HTTPClient) ClientOption + func WithViaGRPC(opts ...grpc.DialOption) ClientOption + type HTTPClient interface + Do func(req *http.Request) (*http.Response, error) + type Oauth2HTTPClient struct + func NewOauth2HTTPClient(oauth2Addr, client, clientSecret string, opts ...Oauth2Option) *Oauth2HTTPClient + func (c *Oauth2HTTPClient) Do(req *http.Request) (*http.Response, error) + type Oauth2Option interface + func WithOauth2HTTPClient(client HTTPClient) Oauth2Option + func WithOauth2HTTPUser(username, password string) Oauth2Option + type PromQLOption func(u *url.URL, q url.Values) + func WithPromQLEnd(t time.Time) PromQLOption + func WithPromQLStart(t time.Time) PromQLOption + func WithPromQLStep(step string) PromQLOption + func WithPromQLTime(t time.Time) PromQLOption