quickwit

package
v0.4.4-beta.2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Iso8601         string = "iso8601"
	Rfc2822         string = "rfc2822"
	Rfc3339         string = "rfc3339"
	TimestampSecs   string = "unix_timestamp_secs"
	TimestampMillis string = "unix_timestamp_millis"
	TimestampMicros string = "unix_timestamp_micros"
	TimestampNanos  string = "unix_timestamp_nanos"
)

Variables

This section is empty.

Functions

func DecodeTimestampFieldFromIndexConfig added in v0.4.0

func DecodeTimestampFieldFromIndexConfig(body []byte) (string, string, error)

func DecodeTimestampFieldFromIndexConfigs added in v0.4.0

func DecodeTimestampFieldFromIndexConfigs(body []byte) (string, string, error)

func FindTimeStampFormat added in v0.3.0

func FindTimeStampFormat(timestampFieldName string, parentName *string, fieldMappings []FieldMappings) (string, bool)

func GetTimestampFieldFromIndex added in v0.4.0

func GetTimestampFieldFromIndex(index string, qwickwitUrl string, cli *http.Client) (string, string, error)

func GetTimestampFieldFromIndexPattern added in v0.4.0

func GetTimestampFieldFromIndexPattern(indexPattern string, qwickwitUrl string, cli *http.Client) (string, string, error)

func GetTimestampFieldInfos added in v0.3.0

func GetTimestampFieldInfos(index string, qwickwitUrl string, cli *http.Client) (string, string, error)

TODO: refactor either by using a timestamp alias suppprted by quickwit or by only using the `GetTimestampFieldFromIndexPattern` once the endpoint /indexes?index_id_pattern= is supported, which is after the next quickwit release > 0.7.1

func NewErrorCreationPayload added in v0.3.0

func NewErrorCreationPayload(statusCode int, message string) error

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 FieldMappings added in v0.3.0

type FieldMappings struct {
	Name          string          `json:"name"`
	Type          string          `json:"type"`
	OutputFormat  *string         `json:"output_format,omitempty"`
	FieldMappings []FieldMappings `json:"field_mappings,omitempty"`
}

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 QuickwitCreationErrorPayload added in v0.3.0

type QuickwitCreationErrorPayload struct {
	Message    string `json:"message"`
	StatusCode int    `json:"status"`
}

type QuickwitDatasource

type QuickwitDatasource struct {
	// contains filtered or unexported fields
}

func (*QuickwitDatasource) CallResource

func (*QuickwitDatasource) 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 (*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

type QuickwitIndexMetadata added in v0.4.0

type QuickwitIndexMetadata struct {
	IndexConfig struct {
		DocMapping struct {
			TimestampField string          `json:"timestamp_field"`
			FieldMappings  []FieldMappings `json:"field_mappings"`
		} `json:"doc_mapping"`
	} `json:"index_config"`
}

Directories

Path Synopsis
kinds

Jump to

Keyboard shortcuts

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