influx

package
v0.0.0-...-f28986b Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInfluxConnection = errors.New("communication with InfluxDB failed")
View Source
var ErrNULL = errors.New("NULL response")
View Source
var ErrNotFound = errors.New("not found")

Functions

func GenerateQueries

func GenerateQueries(elements []model.QueriesRequestElement, timeDirection model.Direction) (query string, err error)

Types

type Client

type Client interface {
	Query(query influxLib.Query) (*influxLib.Response, error)
}

type Influx

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

func NewInflux

func NewInflux(config configuration.Config) (influx *Influx, err error)

func (*Influx) ExecuteQuery

func (this *Influx) ExecuteQuery(db string, query string) (responseP *influxLib.Response, err error)

func (*Influx) GetLatestValue

func (this *Influx) GetLatestValue(db string, pair RequestElement) (timeValuePair TimeValuePair, err error)

func (*Influx) GetLatestValues

func (this *Influx) GetLatestValues(db string, pairs []RequestElement) (timeValuePairs []TimeValuePair, err error)

func (*Influx) GetTags

func (this *Influx) GetTags(db string, measurement string) (tagMap map[string][]string, err error)

type RequestElement

type RequestElement struct {
	Measurement string  `json:"measurement"`
	ColumnName  string  `json:"columnName"`
	Math        *string `json:"math"`
}

type TimeValuePair

type TimeValuePair struct {
	Time  *string     `json:"time"`
	Value interface{} `json:"value"`
}

Jump to

Keyboard shortcuts

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