Documentation ¶
Index ¶
- func ExecuteQuery(ctx context.Context, query models.QueryModel, runner queryRunner, ...) (dr backend.DataResponse)
- func Interpolate(query models.QueryModel) (string, error)
- func NewDatasource() datasource.ServeOpts
- type FrameBuilder
- type InfluxDataSource
- func (ds *InfluxDataSource) CallResource(rtx context.Context, req *backend.CallResourceRequest, ...) error
- func (ds *InfluxDataSource) CheckHealth(ctx context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)
- func (ds *InfluxDataSource) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error)
- type InfluxRunner
- type MockRunner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteQuery ¶
func ExecuteQuery(ctx context.Context, query models.QueryModel, runner queryRunner, maxSeries int) (dr backend.DataResponse)
ExecuteQuery execute a query
func Interpolate ¶
func Interpolate(query models.QueryModel) (string, error)
Interpolate processes macros
func NewDatasource ¶
func NewDatasource() datasource.ServeOpts
NewDatasource creates a new datasource server
Types ¶
type FrameBuilder ¶
type FrameBuilder struct {
// contains filtered or unexported fields
}
FrameBuilder is an interface to help testing
func (*FrameBuilder) Append ¶
func (fb *FrameBuilder) Append(record *query.FluxRecord) error
Append appends a single entry from an influxdb2 record to a data frame Values are appended to _value Tags are appended as labels _measurement holds the dataframe name _field holds the field name.
func (*FrameBuilder) Init ¶
func (fb *FrameBuilder) Init(metadata *query.FluxTableMetadata) error
Init initializes the frame to be returned fields points at entries in the frame, and provides easier access names indexes the columns encountered
type InfluxDataSource ¶
type InfluxDataSource struct {
// contains filtered or unexported fields
}
InfluxDataSource ...
func (*InfluxDataSource) CallResource ¶
func (ds *InfluxDataSource) CallResource(rtx context.Context, req *backend.CallResourceRequest, sender backend.CallResourceResponseSender) error
CallResource HTTP style resource
func (*InfluxDataSource) CheckHealth ¶
func (ds *InfluxDataSource) CheckHealth(ctx context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)
CheckHealth will check the currently configured settings
func (*InfluxDataSource) QueryData ¶
func (ds *InfluxDataSource) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error)
QueryData - Primary method called by grafana-server
type InfluxRunner ¶
type InfluxRunner struct {
// contains filtered or unexported fields
}
InfluxRunner This is an interface to help testing
type MockRunner ¶
type MockRunner struct {
// contains filtered or unexported fields
}
MockRunner reads loacal file path