Documentation ¶
Index ¶
- func NewDatasource(settings backend.DataSourceInstanceSettings) (instancemgmt.Instance, error)
- type OracleDatasource
- type OracleDatasourceColumn
- type OracleDatasourceConnection
- func (c *OracleDatasourceConnection) Connect(settings *OracleDatasourceSettings) error
- func (c *OracleDatasourceConnection) Disconnect() error
- func (c *OracleDatasourceConnection) IsConnected() bool
- func (c *OracleDatasourceConnection) Ping() error
- func (c *OracleDatasourceConnection) Reconnect(settings *OracleDatasourceSettings) error
- type OracleDatasourceInfo
- type OracleDatasourceQuery
- type OracleDatasourceResult
- type OracleDatasourceSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDatasource ¶
func NewDatasource(settings backend.DataSourceInstanceSettings) (instancemgmt.Instance, error)
NewDatasource creates a new datasource instance.
Types ¶
type OracleDatasource ¶
type OracleDatasource struct {
// contains filtered or unexported fields
}
Datasource is an example datasource which can respond to data queries, reports its health and has streaming skills.
func (*OracleDatasource) CheckHealth ¶
func (d *OracleDatasource) CheckHealth(_ context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)
CheckHealth handles health checks sent from Grafana to the plugin. The main use case for these health checks is the test button on the datasource configuration page which allows users to verify that a datasource is working as expected.
func (*OracleDatasource) Dispose ¶
func (d *OracleDatasource) Dispose()
Dispose here tells plugin SDK that plugin wants to clean up resources when a new instance created. As soon as datasource settings change detected by SDK old datasource instance will be disposed and a new one will be created using NewSampleDatasource factory function.
func (*OracleDatasource) QueryData ¶
func (d *OracleDatasource) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error)
QueryData handles multiple queries and returns multiple responses. req contains the queries []DataQuery (where each query contains RefID as a unique identifier). The QueryDataResponse contains a map of RefID to the response for each query, and each response contains Frames ([]*Frame).
type OracleDatasourceColumn ¶
type OracleDatasourceColumn struct {
// contains filtered or unexported fields
}
type OracleDatasourceConnection ¶
type OracleDatasourceConnection struct {
// contains filtered or unexported fields
}
func (*OracleDatasourceConnection) Connect ¶
func (c *OracleDatasourceConnection) Connect(settings *OracleDatasourceSettings) error
func (*OracleDatasourceConnection) Disconnect ¶
func (c *OracleDatasourceConnection) Disconnect() error
func (*OracleDatasourceConnection) IsConnected ¶
func (c *OracleDatasourceConnection) IsConnected() bool
func (*OracleDatasourceConnection) Ping ¶
func (c *OracleDatasourceConnection) Ping() error
func (*OracleDatasourceConnection) Reconnect ¶
func (c *OracleDatasourceConnection) Reconnect(settings *OracleDatasourceSettings) error
type OracleDatasourceInfo ¶
type OracleDatasourceQuery ¶
type OracleDatasourceQuery struct { Datasource OracleDatasourceInfo DatasourceId int64 IntervalMs int64 O_parsed string O_sql string RefId string }
func (*OracleDatasourceQuery) MakeQuery ¶
func (q *OracleDatasourceQuery) MakeQuery(c *OracleDatasourceConnection, from time.Time, to time.Time) OracleDatasourceResult
func (*OracleDatasourceQuery) ParseDatasourceQuery ¶
func (q *OracleDatasourceQuery) ParseDatasourceQuery(query backend.DataQuery) error
type OracleDatasourceResult ¶
type OracleDatasourceResult struct {
// contains filtered or unexported fields
}
type OracleDatasourceSettings ¶
type OracleDatasourceSettings struct { O_connStr string O_hostname string O_password string O_port int O_service string O_sid string O_user string }
func ParseDatasourceSettings ¶
func ParseDatasourceSettings(rawOptions json.RawMessage, decryptedOptions map[string]string) OracleDatasourceSettings