Documentation ¶
Index ¶
- type Plugin
- func (p *Plugin) CheckHealth(ctx context.Context) error
- func (p *Plugin) Dispose()
- func (p *Plugin) ExecQuery(ctx context.Context, q *Query) (data.Frames, error)
- func (p *Plugin) GetColumns(keyspace, table, needType string) ([]string, error)
- func (p *Plugin) GetKeyspaces(ctx context.Context) ([]string, error)
- func (p *Plugin) GetTables(keyspace string) ([]string, error)
- func (p *Plugin) GetVariables(ctx context.Context, query string) ([]Variable, error)
- type Query
- type Variable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin represents grafana datasource plugin.
func (*Plugin) CheckHealth ¶
CheckHealth executes repository Ping method to check database health.
func (*Plugin) Dispose ¶
func (p *Plugin) Dispose()
Dispose closes all connections to Cassandra cluster.
func (*Plugin) GetColumns ¶
GetColumns fetches and returns Cassandra's list of columns of given type for provided keyspace and table.
func (*Plugin) GetKeyspaces ¶
GetKeyspaces fetches and returns Cassandra's list of keyspaces.
type Query ¶
type Query struct { RawQuery bool Target string Keyspace string Table string ColumnValue string ColumnID string ValueID string AliasID string ColumnTime string TimeFrom time.Time TimeTo time.Time AllowFiltering bool Instant bool IsAlertQuery bool }
func (*Query) BuildStatement ¶
BuildStatement builds cassandra query statement with positional parameters.
type Variable ¶
Variable is a type to transfer variable data from backend to frontend, where it will be put into MetricFindValue type. https://github.com/grafana/grafana/blob/main/packages/grafana-data/src/types/datasource.ts#L595