Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultGrafanaBaseURL = "https://grafana.observability.ethpandaops.io" DefaultPromDatasourceID = "UhcO3vy7z" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// Query executes a Grafana query.
Query(ctx context.Context, query string) (*QueryResponse, error)
// GetBaseURL returns the base URL of the Grafana instance.
GetBaseURL() string
}
Client is the interface for Grafana operations.
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
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.
Click to show internal directories.
Click to hide internal directories.