influxdb

package
v0.0.0-...-82de52e Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinaryOperationType

type BinaryOperationType int

BinaryOperationType represents the operation type

const (
	// UnknownBinary type.
	UnknownBinary BinaryOperationType = 0
	// ScalarToScalar Operation.
	ScalarToScalar BinaryOperationType = 1
	// ScalarToSeries and series type.
	ScalarToSeries BinaryOperationType = 2
	// SeriesToScalar and series type.
	SeriesToScalar BinaryOperationType = 3
	// SeriesToSeries type.
	SeriesToSeries BinaryOperationType = 4
)

type Error

type Error struct {
	Message string `json:"error,omitempty"`
}

Error structure

type ExprReturn

type ExprReturn int

ExprReturn represents the type returned by the expr.

const (
	// Unknown type.
	Unknown ExprReturn = 0
	// Scalar type.
	Scalar ExprReturn = 1
	// SeriesSet type.
	SeriesSet ExprReturn = 2
)

type InfluxDB

type InfluxDB struct {
	ReqCounter  prometheus.Counter
	ErrCounter  prometheus.Counter
	WarnCounter prometheus.Counter
}

InfluxDB endpoint

func NewInfluxDB

func NewInfluxDB() *InfluxDB

NewInfluxDB is creating a new influxDB query handler

func (*InfluxDB) GetReqCounter

func (p *InfluxDB) GetReqCounter() prometheus.Counter

GetReqCounter satisfies the protocol interface

func (*InfluxDB) Ping

func (i *InfluxDB) Ping(w http.ResponseWriter, r *http.Request)

Ping returns a simple response to let the client know the server is running.

type InfluxMeasurement

type InfluxMeasurement struct {
	StripMeasurement bool
	EmitName         string
}

InfluxMeasurement data

type InfluxParser

type InfluxParser struct {
	Classnames    []string
	Field         string
	BucketTime    string
	BucketCount   string
	End           string
	Start         string
	Token         string
	Shift         string
	GroupByTags   []string
	Fill          influxql.FillOption
	FillValue     interface{}
	TimeColumn    *InfluxTimeColumn
	HasGroupBy    bool
	Measurement   *InfluxMeasurement
	Response      *InfluxResponse
	TimePrecision string
	HasSubQuery   bool
	SubQueryLevel int
	StarQuery     bool
	HasWildCard   bool
	Separator     string
	KeepTopLabels []string
}

InfluxParser in the main structure when parsing a select statement

type InfluxResponse

type InfluxResponse struct {
	Dedup   bool
	Limit   int
	Offset  int
	SLimit  int
	SOffset int
}

InfluxResponse data

type InfluxShowStatement

type InfluxShowStatement struct {
	QueryType  ShowType
	Name       string
	Columns    []string
	TagKeyExpr influxql.Literal
	Separator  string
}

InfluxShowStatement in the main structure when parsing a show statement

type InfluxTimeColumn

type InfluxTimeColumn struct {
	ReverseSort    bool
	TimeAlias      string
	OmitColumnTime bool
}

InfluxTimeColumn data

type Message

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

Message represents a user-facing message to be included with the result.

type Response

type Response struct {
	Results []Result `json:"results,omitempty"`
	Err     string   `json:"error,omitempty"`
}

Response Influx Native response

type Result

type Result struct {
	// StatementID is just the statement's position in the query. It's used
	// to combine statement results if they're being buffered in memory.
	StatementID int        `json:"statement_id"`
	Series      []*Row     `json:"series,omitempty"`
	Messages    []*Message `json:"messages,omitempty"`
	Partial     bool       `json:"partial,omitempty"`
	Err         string     `json:"error,omitempty"`
}

Result represents a resultset returned from a single statement. Rows represents a list of rows that can be sorted consistently by name/tag.

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"`
	Partial bool              `json:"partial,omitempty"`
}

Row represents a single row returned from the execution of a statement.

type ShowType

type ShowType int

ShowType represents the FIND operation type

const (
	// ShowMeasurements type.
	ShowMeasurements ShowType = 0
	// ShowFieldKeys type.
	ShowFieldKeys ShowType = 1
	// ShowTagKeys type.
	ShowTagKeys ShowType = 2
	// ShowSeries type.
	ShowSeries ShowType = 3
	// ShowTagValues type.
	ShowTagValues ShowType = 4
	// ShowTagValuesCardinality type.
	ShowTagValuesCardinality ShowType = 5
)

type SimpleErrorResult

type SimpleErrorResult struct {
	Err string `json:"error,omitempty"`
}

SimpleErrorResult is a simple Error JSON retuned by InfluxQL

type WhereCond

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

WhereCond Where statement data

func (*WhereCond) String

func (w *WhereCond) String() string

String: WhereCond to string

Jump to

Keyboard shortcuts

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