Documentation ¶
Index ¶
Constants ¶
const ( Lucene = "lucene" PPL = "PPL" )
Query Types
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketAgg ¶
type BucketAgg struct { Field string `json:"field"` ID string `json:"id"` Settings *simplejson.Json `json:"settings"` Type string `jsons:"type"` }
BucketAgg represents a bucket aggregation of the time series query model of the datasource
type ElasticsearchDatasource ¶
type ElasticsearchDatasource struct {
// contains filtered or unexported fields
}
func NewElasticsearchDatasource ¶
func NewElasticsearchDatasource() *ElasticsearchDatasource
func (*ElasticsearchDatasource) CheckHealth ¶
func (ds *ElasticsearchDatasource) 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 (*ElasticsearchDatasource) QueryData ¶
func (ds *ElasticsearchDatasource) 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 identifer). The QueryDataResponse contains a map of RefID to the response for each query, and each response contains Frames ([]*Frame).
type ElasticsearchDatasourceInstance ¶
type ElasticsearchDatasourceInstance struct {
// contains filtered or unexported fields
}
type ElasticsearchExecutor ¶
type ElasticsearchExecutor struct{}
ElasticsearchExecutor represents a handler for handling elasticsearch datasource request
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 { TimeField string `json:"timeField"` RawQuery string `json:"query"` QueryType string `json:"queryType"` BucketAggs []*BucketAgg `json:"bucketAggs"` Metrics []*MetricAgg `json:"metrics"` Alias string `json:"alias"` Interval string RefID string }
Query represents the time series query model of the datasource