flux

package
v2.0.0-beta2.0...-3469a79 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConstStatements are any statements that Trickster doesn't care about modifying.
	// This is most statements.
	Const = StatementKind(iota)
	// RangeStatements are the range(...) contained in the query.
	Range
)

Variables

This section is empty.

Functions

func ErrFluxSemantics

func ErrFluxSemantics(rule string) error

func ErrFluxSyntax

func ErrFluxSyntax(token, rule string) error

Types

type ConstStatement

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

func (*ConstStatement) Kind

func (stmt *ConstStatement) Kind() StatementKind

func (*ConstStatement) String

func (stmt *ConstStatement) String() string

type FluxSemanticsError

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

func (*FluxSemanticsError) Error

func (err *FluxSemanticsError) Error() string

type FluxSyntaxError

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

func (*FluxSyntaxError) Error

func (err *FluxSyntaxError) Error() string

type InvalidTimeFormatError

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

func ErrInvalidTimeFormat

func ErrInvalidTimeFormat(relativeDuration, absoluteTime, unixTimestamp error) *InvalidTimeFormatError

func (*InvalidTimeFormatError) Error

func (err *InvalidTimeFormatError) Error() string

type Parser

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

func NewParser

func NewParser(reader io.Reader) *Parser

func (*Parser) ParseQuery

func (p *Parser) ParseQuery() (*Query, bool, error)

Parse a Flux query. Returns the query and an error, plus a bool indicating if the query can use the OPC or not. A 'true' value should be taken as the error being for Trickster (no timestep), but not necessarily for InfluxDB.

type Query

type Query struct {
	Extent timeseries.Extent
	Step   time.Duration
	// contains filtered or unexported fields
}

func (*Query) SetExtent

func (q *Query) SetExtent(ext timeseries.Extent)

func (*Query) String

func (q *Query) String() string

type RangeStatement

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

func (*RangeStatement) Kind

func (stmt *RangeStatement) Kind() StatementKind

func (*RangeStatement) String

func (stmt *RangeStatement) String() string

type Statement

type Statement interface {
	// Kind() returns the StatementKind of the statement.
	Kind() StatementKind
	// String() returns a string representation of the statement.
	String() string
}

type StatementKind

type StatementKind int

Jump to

Keyboard shortcuts

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