Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Dataset ¶
type Dataset struct { Name string // Name of this dataset Columns []string // Ordered array of cols Mtx *mtx.Dense `json:"-"` // Dense Matrix contains all values in the dataset Stats *Stats WithValues bool // contains filtered or unexported fields }
Dataset consists of a name and an ordered array of column names
func (Dataset) CPos ¶
CPos returns the position of a column name in a dataset. If the column does not exist it returns -1
func (*Dataset) MarshalJSON ¶
func (*Dataset) Next ¶
Next returns the next row of values If all values have been traversed it returns io.EOF. Implements the loader.Reader interface
func (*Dataset) UnmarshalJSON ¶
type Grouping ¶
Grouping represents a "group by" configuration
func NewGrouping ¶
NewGrouping returns a grouping based on a string parameter. See documentation for Duration str format
Duration,0,1min ^--------^-^----Name,Index,DurationStr
func (Grouping) MarshalJSON ¶
func (Grouping) UnmarshalJSON ¶
type Query ¶
type Query struct { Datasets []struct { Name string // Name of the dataset Columns []string // Columns within the dataset to query } Function *Function Grouping *Grouping }
Query can be used to combine the results of multiple datasets into a single matrix of values. Queries can originate from the command line as arguments, a URL query string, or a JSON encoded payload.
Command line arguments take the same form as URL encoding
Text Specification: d=DS1,x,y&d=DS2,z,fuu&grouping=Duration,0,1m&fn=avg
func NewQuery ¶
NewQuery constructs a Query from the provided args and optionally specified function. If function is specified the query returns aggregated