Documentation
¶
Index ¶
- Variables
- type Credential
- type Grafana
- type GrafanaClient
- func (g GrafanaClient) Dashboard(ctx context.Context, dashUID string) (dashboard.Dashboard, error)
- func (g GrafanaClient) PanelCSV(_ context.Context, dashUID string, p dashboard.Panel, t dashboard.TimeRange) (dashboard.CSVData, error)
- func (g GrafanaClient) PanelPNG(ctx context.Context, dashUID string, p dashboard.Panel, t dashboard.TimeRange) (dashboard.PanelImage, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Credential ¶
type Grafana ¶
type Grafana interface { Dashboard(ctx context.Context, dashUID string) (dashboard.Dashboard, error) PanelPNG(ctx context.Context, dashUID string, p dashboard.Panel, t dashboard.TimeRange) (dashboard.PanelImage, error) PanelCSV(ctx context.Context, dashUID string, p dashboard.Panel, t dashboard.TimeRange) (dashboard.CSVData, error) }
Grafana is a Grafana API httpClient.
type GrafanaClient ¶
type GrafanaClient struct {
// contains filtered or unexported fields
}
GrafanaClient is the struct that will implement required interfaces.
func New ¶
func New( logger log.Logger, conf config.Config, httpClient *http.Client, chromeInstance chrome.Instance, workerPools worker.Pools, appURL string, credential Credential, queryParams url.Values, ) GrafanaClient
New creates a new Grafana Client. Cookies and Authorization headers, if found, will be forwarded in the requests queryParams are Grafana template variable url values of the form var-{name}={value}, e.g. var-host=dev.
Click to show internal directories.
Click to hide internal directories.