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 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 OpenSearchDatasource ¶
type OpenSearchDatasource struct {
// contains filtered or unexported fields
}
func NewOpenSearchDatasource ¶
func NewOpenSearchDatasource() *OpenSearchDatasource
func (*OpenSearchDatasource) CheckHealth ¶
func (ds *OpenSearchDatasource) 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 (*OpenSearchDatasource) QueryData ¶
func (ds *OpenSearchDatasource) 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 OpenSearchDatasourceInstance ¶
type OpenSearchDatasourceInstance struct {
// contains filtered or unexported fields
}
type OpenSearchExecutor ¶
type OpenSearchExecutor struct{}
OpenSearchExecutor represents a handler for handling OpenSearch datasource request
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