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 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.
func (*InfluxDB) Query ¶
func (i *InfluxDB) Query(w http.ResponseWriter, r *http.Request)
Query is handling Query Taken from https://github.com/influxdata/influxdb/blob/f19588360e601ffe5a0bc11c1af1e2fa7fff1112/services/httpd/handler.go#L307
type InfluxMeasurement ¶
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 ¶
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 ¶
InfluxTimeColumn data
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