plugin

package
v0.0.0-...-91b10f3 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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 New

func New(repo repository) *Plugin

New returns configured Plugin.

func (*Plugin) CheckHealth

func (p *Plugin) CheckHealth(ctx context.Context) error

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) ExecQuery

func (p *Plugin) ExecQuery(ctx context.Context, q *cassandra.Query) (data.Frames, error)

ExecQuery executes metric query based on provided query type.

func (*Plugin) GetColumns

func (p *Plugin) GetColumns(keyspace, table, needType string) ([]string, error)

GetColumns fetches and returns Cassandra's list of columns of given type for provided keyspace and table.

func (*Plugin) GetKeyspaces

func (p *Plugin) GetKeyspaces(ctx context.Context) ([]string, error)

GetKeyspaces fetches and returns Cassandra's list of keyspaces.

func (*Plugin) GetTables

func (p *Plugin) GetTables(keyspace string) ([]string, error)

GetTables fetches and returns Cassandra's list of tables for provided keyspace.

Jump to

Keyboard shortcuts

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