Documentation
¶
Index ¶
- Constants
- func NewQuickwitDatasource(settings backend.DataSourceInstanceSettings) (instancemgmt.Instance, error)
- func ParseToTime(value interface{}, timeOutputFormat string) (time.Time, error)
- type BucketAgg
- type MetricAgg
- type Query
- type QuickwitDatasource
- func (ds *QuickwitDatasource) CallResource(ctx context.Context, req *backend.CallResourceRequest, ...) error
- func (ds *QuickwitDatasource) CheckHealth(ctx context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)
- func (ds *QuickwitDatasource) Dispose()
- func (ds *QuickwitDatasource) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error)
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func NewQuickwitDatasource ¶
func NewQuickwitDatasource(settings backend.DataSourceInstanceSettings) (instancemgmt.Instance, error)
Creates a Quickwit datasource.
Types ¶
type BucketAgg ¶
type BucketAgg struct {
Field string `json:"field"`
ID string `json:"id"`
Settings *simplejson.Json `json:"settings"`
Type string `json:"type"`
}
BucketAgg represents a bucket aggregation of the time series query model of the datasource
type MetricAgg ¶
type MetricAgg struct {
Field string `json:"field"`
Hide bool `json:"hide"`
ID string `json:"id"`
PipelineAggregate string `json:"pipelineAgg"`
PipelineVariables map[string]string `json:"pipelineVariables"`
Settings *simplejson.Json `json:"settings"`
Meta *simplejson.Json `json:"meta"`
Type string `json:"type"`
}
MetricAgg represents a metric aggregation of the time series query model of the datasource
type Query ¶
type Query struct {
RawQuery string `json:"query"`
BucketAggs []*BucketAgg `json:"bucketAggs"`
Metrics []*MetricAgg `json:"metrics"`
Alias string `json:"alias"`
Interval time.Duration
IntervalMs int64
RefID string
MaxDataPoints int64
}
Query represents the time series query model of the datasource
type QuickwitDatasource ¶
type QuickwitDatasource struct {
// contains filtered or unexported fields
}
func (*QuickwitDatasource) CallResource ¶
func (ds *QuickwitDatasource) CallResource(ctx context.Context, req *backend.CallResourceRequest, sender backend.CallResourceResponseSender) error
func (*QuickwitDatasource) CheckHealth ¶
func (ds *QuickwitDatasource) CheckHealth(ctx 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 (*QuickwitDatasource) Dispose ¶
func (ds *QuickwitDatasource) 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 (*QuickwitDatasource) QueryData ¶
func (ds *QuickwitDatasource) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error)