grafana

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrafanaClient added in v0.0.3

type GrafanaClient interface {
	// Query executes a Grafana query.
	Query(ctx context.Context, query string) (*QueryResponse, error)
}

GrafanaClient is the interface for Grafana operations.

func NewClient

func NewClient(baseURL string, dataSourceID string, apiKey string, httpClient *http.Client) GrafanaClient

NewClient creates a new Grafana client.

type QueryData added in v0.0.3

type QueryData struct {
	Values []interface{} `json:"values"`
}

QueryData represents the data in the Grafana response.

type QueryField added in v0.0.3

type QueryField struct {
	Labels map[string]string `json:"labels"`
}

QueryField represents a field in the Grafana response.

type QueryFrame added in v0.0.3

type QueryFrame struct {
	Schema QuerySchema `json:"schema"`
	Data   QueryData   `json:"data"`
}

QueryFrame represents a frame in the Grafana response.

type QueryPandaPulse added in v0.0.3

type QueryPandaPulse struct {
	Frames []QueryFrame `json:"frames"`
}

QueryPandaPulse represents the PandaPulse section in the Grafana response.

type QueryResponse

type QueryResponse struct {
	Results QueryResults `json:"results"`
}

QueryResponse is the response from a Grafana query.

type QueryResults added in v0.0.3

type QueryResults struct {
	PandaPulse QueryPandaPulse `json:"pandaPulse"`
}

QueryResults represents the results in the Grafana response.

type QuerySchema added in v0.0.3

type QuerySchema struct {
	Fields []QueryField `json:"fields"`
}

QuerySchema represents the schema in the Grafana response.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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