opensearch

package
v1.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
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

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

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

type TsdbQueryEndpoint

type TsdbQueryEndpoint interface {
	Query(ctx context.Context, ds *backend.DataSourceInstanceSettings, query *tsdb.TsdbQuery) (*tsdb.Response, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL