influxdb

package
v0.0.0-testrgm3 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: AGPL-3.0 Imports: 23 Imported by: 132

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidHttpMode = errors.New("'httpMode' should be either 'GET' or 'POST'")

Functions

func CheckInfluxQLHealth

func CheckInfluxQLHealth(ctx context.Context, dsInfo *models.DatasourceInfo, s *Service) (*backend.CheckHealthResult, error)

Types

type DefinitionParameters

type DefinitionParameters struct {
	Name string
	Type string
}

type InfluxdbQueryParser

type InfluxdbQueryParser struct{}

func (*InfluxdbQueryParser) Parse

func (qp *InfluxdbQueryParser) Parse(query backend.DataQuery) (*Query, error)

type Message

type Message struct {
	Level string `json:"level,omitempty"`
	Text  string `json:"text,omitempty"`
}

type Query

type Query struct {
	Measurement string
	Policy      string
	Tags        []*Tag
	GroupBy     []*QueryPart
	Selects     []*Select
	RawQuery    string
	UseRawQuery bool
	Alias       string
	Interval    time.Duration
	Tz          string
	Limit       string
	Slimit      string
	OrderByTime string
	RefID       string
}

func (*Query) Build

func (query *Query) Build(queryContext *backend.QueryDataRequest) (string, error)

type QueryDefinition

type QueryDefinition struct {
	Renderer func(query *Query, queryContext *backend.QueryDataRequest, part *QueryPart, innerExpr string) string
	Params   []DefinitionParameters
}

type QueryPart

type QueryPart struct {
	Def    QueryDefinition
	Type   string
	Params []string
}

func NewQueryPart

func NewQueryPart(typ string, params []string) (*QueryPart, error)

func (*QueryPart) Render

func (qp *QueryPart) Render(query *Query, queryContext *backend.QueryDataRequest, expr string) string

type Response

type Response struct {
	Results []Result
	Error   string
}

type ResponseParser

type ResponseParser struct{}

func (*ResponseParser) Parse

func (rp *ResponseParser) Parse(buf io.ReadCloser, statusCode int, queries []Query) *backend.QueryDataResponse

type Result

type Result struct {
	Series   []Row
	Messages []*Message
	Error    string
}

type Row

type Row struct {
	Name    string            `json:"name,omitempty"`
	Tags    map[string]string `json:"tags,omitempty"`
	Columns []string          `json:"columns,omitempty"`
	Values  [][]interface{}   `json:"values,omitempty"`
}

type Select

type Select []QueryPart

type Service

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

func ProvideService

func ProvideService(httpClient httpclient.Provider) *Service

func (*Service) CheckHealth

func (*Service) QueryData

type Tag

type Tag struct {
	Key       string
	Operator  string
	Value     string
	Condition string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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