influxdb

package
v5.2.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2018 License: Apache-2.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInfluxDBExecutor

func NewInfluxDBExecutor(datasource *models.DataSource) (tsdb.TsdbQueryEndpoint, error)

Types

type DefinitionParameters

type DefinitionParameters struct {
	Name string
	Type string
}

type InfluxDBExecutor

type InfluxDBExecutor struct {
	//*models.DataSource
	QueryParser    *InfluxdbQueryParser
	ResponseParser *ResponseParser
}

func (*InfluxDBExecutor) Query

func (e *InfluxDBExecutor) Query(ctx context.Context, dsInfo *models.DataSource, tsdbQuery *tsdb.TsdbQuery) (*tsdb.Response, error)

type InfluxDbSelect

type InfluxDbSelect struct {
	Type string
}

type InfluxdbQueryParser

type InfluxdbQueryParser struct{}

func (*InfluxdbQueryParser) Parse

func (qp *InfluxdbQueryParser) Parse(model *simplejson.Json, dsInfo *models.DataSource) (*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
	ResultFormat string
	Tags         []*Tag
	GroupBy      []*QueryPart
	Selects      []*Select
	RawQuery     string
	UseRawQuery  bool
	Alias        string
	Interval     time.Duration
}

func (*Query) Build

func (query *Query) Build(queryContext *tsdb.TsdbQuery) (string, error)

type QueryDefinition

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

func (QueryDefinition) Render

func (r QueryDefinition) Render(query *Query, queryContext *tsdb.TsdbQuery, part *QueryPart, innerExpr string) string

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 *tsdb.TsdbQuery, expr string) string

type Response

type Response struct {
	Results []Result
	Err     error
}

type ResponseParser

type ResponseParser struct{}

func (*ResponseParser) Parse

func (rp *ResponseParser) Parse(response *Response, query *Query) *tsdb.QueryResult

type Result

type Result struct {
	Series   []Row
	Messages []*Message
	Err      error
}

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 Tag

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

Jump to

Keyboard shortcuts

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