Documentation ¶
Index ¶
- Constants
- Variables
- func DivideOperator(elems []*parser.Value, fields []string, point *protocol.Point) (*protocol.FieldValue, error)
- func EqualityOperator(leftValue, rightValue *protocol.FieldValue) (bool, error)
- func Filter(query *parser.SelectQuery, series *protocol.Series) (*protocol.Series, error)
- func GetValue(value *parser.Value, fields []string, point *protocol.Point) (*protocol.FieldValue, error)
- func GreaterThanOperator(leftValue, rightValue *protocol.FieldValue) (bool, error)
- func GreaterThanOrEqualOperator(leftValue, rightValue *protocol.FieldValue) (bool, error)
- func InOperator(leftValue *protocol.FieldValue, rightValue []*protocol.FieldValue) (bool, error)
- func MinusOperator(elems []*parser.Value, fields []string, point *protocol.Point) (*protocol.FieldValue, error)
- func MultiplyOperator(elems []*parser.Value, fields []string, point *protocol.Point) (*protocol.FieldValue, error)
- func PlusOperator(elems []*parser.Value, fields []string, point *protocol.Point) (*protocol.FieldValue, error)
- func RegexMatcherOperator(leftValue, rightValue *protocol.FieldValue) (bool, error)
- func SortInt64(ints []int64)
- type AbstractAggregator
- type Aggregator
- func NewCompositeAggregator(left, right Aggregator) (Aggregator, error)
- func NewCountAggregator(q *parser.SelectQuery, v *parser.Value, defaultValue *parser.Value) (Aggregator, error)
- func NewCumulativeArithmeticAggregator(name string, value *parser.Value, initialValue float64, ...) (Aggregator, error)
- func NewDerivativeAggregator(q *parser.SelectQuery, v *parser.Value, defaultValue *parser.Value) (Aggregator, error)
- func NewDistinctAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
- func NewFirstAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
- func NewFirstOrLastAggregator(name string, v *parser.Value, isFirst bool, defaultValue *parser.Value) (Aggregator, error)
- func NewHistogramAggregator(q *parser.SelectQuery, v *parser.Value, defaultValue *parser.Value) (Aggregator, error)
- func NewLastAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
- func NewMaxAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
- func NewMeanAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
- func NewMedianAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
- func NewMinAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
- func NewModeAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
- func NewPercentileAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
- func NewStandardDeviationAggregator(q *parser.SelectQuery, v *parser.Value, defaultValue *parser.Value) (Aggregator, error)
- func NewSumAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
- func NewTimestampAggregator(query *parser.SelectQuery, _ *parser.Value) (Aggregator, error)
- type AggregatorInitializer
- type ArithmeticOperator
- type AscendingAggregatorSortableGroups
- type AscendingGroupTimestampSortableGroups
- type BooleanOperation
- type CommonSortableGroups
- type CompositeAggregator
- func (self *CompositeAggregator) AggregatePoint(series string, group interface{}, p *protocol.Point) error
- func (self *CompositeAggregator) ColumnNames() []string
- func (self *CompositeAggregator) GetValues(series string, group interface{}) [][]*protocol.FieldValue
- func (self *CompositeAggregator) InitializeFieldsMetadata(series *protocol.Series) error
- type CountAggregator
- func (self *CountAggregator) AggregatePoint(series string, group interface{}, p *protocol.Point) error
- func (self *CountAggregator) ColumnNames() []string
- func (self *CountAggregator) GetValues(series string, group interface{}) [][]*protocol.FieldValue
- func (self *CountAggregator) InitializeFieldsMetadata(series *protocol.Series) error
- type CumulativeArithmeticAggregator
- type DerivativeAggregator
- type DescendingAggregatorSortableGroups
- type DescendingGroupTimestampSortableGroups
- type DistinctAggregator
- type EngineI
- type FirstOrLastAggregator
- type Group
- type Group0
- type Group1
- type Group2
- type Group3
- type HistogramAggregator
- type Int64Slice
- type ListSeriesEngine
- type Mapper
- type MeanAggregator
- type ModeAggregator
- type Operation
- type PassthroughEngine
- type PercentileAggregator
- type PointFilter
- type PointRange
- type PointSlice
- type QueryEngine
- type SortableGroups
- type StandardDeviationAggregator
- type StandardDeviationRunning
- type TimestampAggregator
- func (self *TimestampAggregator) AggregatePoint(series string, group interface{}, p *protocol.Point) error
- func (self *TimestampAggregator) ColumnNames() []string
- func (self *TimestampAggregator) GetValues(series string, group interface{}) [][]*protocol.FieldValue
- func (self *TimestampAggregator) InitializeFieldsMetadata(series *protocol.Series) error
Constants ¶
View Source
const (
MAX_SERIES_IN_RESPONSE = 10000
)
View Source
const (
POINT_BATCH_SIZE = 100
)
Variables ¶
View Source
var ALL_GROUP_IDENTIFIER = Group0{}
Functions ¶
func DivideOperator ¶ added in v0.5.0
func EqualityOperator ¶ added in v0.5.0
func EqualityOperator(leftValue, rightValue *protocol.FieldValue) (bool, error)
func GreaterThanOperator ¶ added in v0.5.0
func GreaterThanOperator(leftValue, rightValue *protocol.FieldValue) (bool, error)
func GreaterThanOrEqualOperator ¶ added in v0.5.0
func GreaterThanOrEqualOperator(leftValue, rightValue *protocol.FieldValue) (bool, error)
func InOperator ¶ added in v0.5.0
func InOperator(leftValue *protocol.FieldValue, rightValue []*protocol.FieldValue) (bool, error)
func MinusOperator ¶ added in v0.5.0
func MultiplyOperator ¶ added in v0.5.0
func PlusOperator ¶ added in v0.5.0
func RegexMatcherOperator ¶ added in v0.5.0
func RegexMatcherOperator(leftValue, rightValue *protocol.FieldValue) (bool, error)
Types ¶
type AbstractAggregator ¶ added in v0.3.0
type AbstractAggregator struct { Aggregator // contains filtered or unexported fields }
func (*AbstractAggregator) InitializeFieldsMetadata ¶ added in v0.3.0
func (self *AbstractAggregator) InitializeFieldsMetadata(series *protocol.Series) error
type Aggregator ¶
type Aggregator interface { AggregatePoint(series string, group interface{}, p *protocol.Point) error InitializeFieldsMetadata(series *protocol.Series) error GetValues(series string, group interface{}) [][]*protocol.FieldValue ColumnNames() []string }
func NewCompositeAggregator ¶ added in v0.0.6
func NewCompositeAggregator(left, right Aggregator) (Aggregator, error)
func NewCountAggregator ¶
func NewCountAggregator(q *parser.SelectQuery, v *parser.Value, defaultValue *parser.Value) (Aggregator, error)
func NewDerivativeAggregator ¶ added in v0.0.8
func NewDerivativeAggregator(q *parser.SelectQuery, v *parser.Value, defaultValue *parser.Value) (Aggregator, error)
func NewDistinctAggregator ¶
func NewDistinctAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
func NewFirstAggregator ¶ added in v0.3.0
func NewFirstAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
func NewFirstOrLastAggregator ¶ added in v0.3.0
func NewHistogramAggregator ¶ added in v0.3.0
func NewHistogramAggregator(q *parser.SelectQuery, v *parser.Value, defaultValue *parser.Value) (Aggregator, error)
func NewLastAggregator ¶ added in v0.3.0
func NewLastAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
func NewMaxAggregator ¶
func NewMaxAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
func NewMeanAggregator ¶
func NewMeanAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
func NewMedianAggregator ¶
func NewMedianAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
func NewMinAggregator ¶
func NewMinAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
func NewModeAggregator ¶
func NewModeAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
func NewPercentileAggregator ¶
func NewPercentileAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
func NewStandardDeviationAggregator ¶ added in v0.0.9
func NewStandardDeviationAggregator(q *parser.SelectQuery, v *parser.Value, defaultValue *parser.Value) (Aggregator, error)
func NewSumAggregator ¶
func NewSumAggregator(_ *parser.SelectQuery, value *parser.Value, defaultValue *parser.Value) (Aggregator, error)
func NewTimestampAggregator ¶
func NewTimestampAggregator(query *parser.SelectQuery, _ *parser.Value) (Aggregator, error)
type AggregatorInitializer ¶
type AggregatorInitializer func(*parser.SelectQuery, *parser.Value, *parser.Value) (Aggregator, error)
Initialize a new aggregator given the query, the function call of the aggregator and the default value that should be returned if the bucket doesn't have any points
type ArithmeticOperator ¶ added in v0.5.0
type AscendingAggregatorSortableGroups ¶ added in v0.4.0
type AscendingAggregatorSortableGroups struct { CommonSortableGroups // contains filtered or unexported fields }
func (*AscendingAggregatorSortableGroups) Less ¶ added in v0.4.0
func (self *AscendingAggregatorSortableGroups) Less(i, j int) bool
type AscendingGroupTimestampSortableGroups ¶ added in v0.4.0
type AscendingGroupTimestampSortableGroups struct {
CommonSortableGroups
}
func (*AscendingGroupTimestampSortableGroups) Less ¶ added in v0.4.0
func (self *AscendingGroupTimestampSortableGroups) Less(i, j int) bool
type BooleanOperation ¶ added in v0.5.0
type BooleanOperation func(leftValue *protocol.FieldValue, rightValues []*protocol.FieldValue) (bool, error)
type CommonSortableGroups ¶ added in v0.4.0
type CommonSortableGroups struct {
// contains filtered or unexported fields
}
func (*CommonSortableGroups) GetSortedGroups ¶ added in v0.4.0
func (self *CommonSortableGroups) GetSortedGroups() []Group
func (*CommonSortableGroups) Len ¶ added in v0.4.0
func (self *CommonSortableGroups) Len() int
func (*CommonSortableGroups) Swap ¶ added in v0.4.0
func (self *CommonSortableGroups) Swap(i, j int)
type CompositeAggregator ¶ added in v0.0.6
type CompositeAggregator struct {
// contains filtered or unexported fields
}
func (*CompositeAggregator) AggregatePoint ¶ added in v0.0.6
func (self *CompositeAggregator) AggregatePoint(series string, group interface{}, p *protocol.Point) error
func (*CompositeAggregator) ColumnNames ¶ added in v0.3.0
func (self *CompositeAggregator) ColumnNames() []string
func (*CompositeAggregator) GetValues ¶ added in v0.3.0
func (self *CompositeAggregator) GetValues(series string, group interface{}) [][]*protocol.FieldValue
func (*CompositeAggregator) InitializeFieldsMetadata ¶ added in v0.0.6
func (self *CompositeAggregator) InitializeFieldsMetadata(series *protocol.Series) error
type CountAggregator ¶
type CountAggregator struct {
// contains filtered or unexported fields
}
func (*CountAggregator) AggregatePoint ¶
func (self *CountAggregator) AggregatePoint(series string, group interface{}, p *protocol.Point) error
func (*CountAggregator) ColumnNames ¶ added in v0.3.0
func (self *CountAggregator) ColumnNames() []string
func (*CountAggregator) GetValues ¶ added in v0.3.0
func (self *CountAggregator) GetValues(series string, group interface{}) [][]*protocol.FieldValue
func (*CountAggregator) InitializeFieldsMetadata ¶
func (self *CountAggregator) InitializeFieldsMetadata(series *protocol.Series) error
type CumulativeArithmeticAggregator ¶
type CumulativeArithmeticAggregator struct { AbstractAggregator // contains filtered or unexported fields }
func (*CumulativeArithmeticAggregator) AggregatePoint ¶
func (self *CumulativeArithmeticAggregator) AggregatePoint(series string, group interface{}, p *protocol.Point) error
func (*CumulativeArithmeticAggregator) ColumnNames ¶ added in v0.3.0
func (self *CumulativeArithmeticAggregator) ColumnNames() []string
func (*CumulativeArithmeticAggregator) GetValues ¶ added in v0.3.0
func (self *CumulativeArithmeticAggregator) GetValues(series string, group interface{}) [][]*protocol.FieldValue
type DerivativeAggregator ¶ added in v0.0.8
type DerivativeAggregator struct { AbstractAggregator // contains filtered or unexported fields }
func (*DerivativeAggregator) AggregatePoint ¶ added in v0.0.8
func (self *DerivativeAggregator) AggregatePoint(series string, group interface{}, p *protocol.Point) error
func (*DerivativeAggregator) ColumnNames ¶ added in v0.3.0
func (self *DerivativeAggregator) ColumnNames() []string
func (*DerivativeAggregator) GetValues ¶ added in v0.3.0
func (self *DerivativeAggregator) GetValues(series string, group interface{}) [][]*protocol.FieldValue
type DescendingAggregatorSortableGroups ¶ added in v0.4.0
type DescendingAggregatorSortableGroups struct { CommonSortableGroups // contains filtered or unexported fields }
func (*DescendingAggregatorSortableGroups) Less ¶ added in v0.4.0
func (self *DescendingAggregatorSortableGroups) Less(i, j int) bool
type DescendingGroupTimestampSortableGroups ¶ added in v0.4.0
type DescendingGroupTimestampSortableGroups struct {
CommonSortableGroups
}
func (*DescendingGroupTimestampSortableGroups) Less ¶ added in v0.4.0
func (self *DescendingGroupTimestampSortableGroups) Less(i, j int) bool
type DistinctAggregator ¶
type DistinctAggregator struct { AbstractAggregator // contains filtered or unexported fields }
func (*DistinctAggregator) AggregatePoint ¶
func (self *DistinctAggregator) AggregatePoint(series string, group interface{}, p *protocol.Point) error
func (*DistinctAggregator) ColumnNames ¶ added in v0.3.0
func (self *DistinctAggregator) ColumnNames() []string
func (*DistinctAggregator) GetValues ¶ added in v0.3.0
func (self *DistinctAggregator) GetValues(series string, group interface{}) [][]*protocol.FieldValue
type FirstOrLastAggregator ¶ added in v0.3.0
type FirstOrLastAggregator struct { AbstractAggregator // contains filtered or unexported fields }
func (*FirstOrLastAggregator) AggregatePoint ¶ added in v0.3.0
func (self *FirstOrLastAggregator) AggregatePoint(series string, group interface{}, p *protocol.Point) error
func (*FirstOrLastAggregator) ColumnNames ¶ added in v0.3.0
func (self *FirstOrLastAggregator) ColumnNames() []string
func (*FirstOrLastAggregator) GetValues ¶ added in v0.3.0
func (self *FirstOrLastAggregator) GetValues(series string, group interface{}) [][]*protocol.FieldValue
type Group0 ¶ added in v0.4.0
type Group0 struct {
Group
}
func (Group0) GetTimestamp ¶ added in v0.4.0
func (Group0) HasTimestamp ¶ added in v0.4.0
func (Group0) WithTimestamp ¶ added in v0.4.0
func (Group0) WithoutTimestamp ¶ added in v0.4.0
type Group1 ¶ added in v0.4.0
type Group1 struct {
// contains filtered or unexported fields
}
func (Group1) GetTimestamp ¶ added in v0.4.0
func (Group1) HasTimestamp ¶ added in v0.4.0
func (Group1) WithTimestamp ¶ added in v0.4.0
func (Group1) WithoutTimestamp ¶ added in v0.4.0
type Group2 ¶ added in v0.4.0
type Group2 struct {
// contains filtered or unexported fields
}
func (Group2) GetTimestamp ¶ added in v0.4.0
func (Group2) HasTimestamp ¶ added in v0.4.0
func (Group2) WithTimestamp ¶ added in v0.4.0
func (Group2) WithoutTimestamp ¶ added in v0.4.0
type Group3 ¶ added in v0.4.0
type Group3 struct {
// contains filtered or unexported fields
}
func (Group3) GetTimestamp ¶ added in v0.4.0
func (Group3) HasTimestamp ¶ added in v0.4.0
func (Group3) WithTimestamp ¶ added in v0.4.0
func (Group3) WithoutTimestamp ¶ added in v0.4.0
type HistogramAggregator ¶ added in v0.3.0
type HistogramAggregator struct { AbstractAggregator // contains filtered or unexported fields }
func (*HistogramAggregator) AggregatePoint ¶ added in v0.3.0
func (self *HistogramAggregator) AggregatePoint(series string, group interface{}, p *protocol.Point) error
func (*HistogramAggregator) ColumnNames ¶ added in v0.3.0
func (self *HistogramAggregator) ColumnNames() []string
func (*HistogramAggregator) GetValues ¶ added in v0.3.0
func (self *HistogramAggregator) GetValues(series string, group interface{}) [][]*protocol.FieldValue
type Int64Slice ¶
type Int64Slice []int64
Int64Slice attaches the methods of sort.Interface to []int64, sorting in increasing order.
func (Int64Slice) Len ¶
func (p Int64Slice) Len() int
func (Int64Slice) Less ¶
func (p Int64Slice) Less(i, j int) bool
func (Int64Slice) Swap ¶
func (p Int64Slice) Swap(i, j int)
type ListSeriesEngine ¶ added in v0.5.0
type ListSeriesEngine struct {
// contains filtered or unexported fields
}
func NewListSeriesEngine ¶ added in v0.5.0
func NewListSeriesEngine(responseChan chan *protocol.Response) *ListSeriesEngine
func (*ListSeriesEngine) Close ¶ added in v0.5.0
func (self *ListSeriesEngine) Close()
func (*ListSeriesEngine) YieldPoint ¶ added in v0.5.0
type Mapper ¶
Mapper given a point returns a group identifier as the first return result and a non-time dependent group (the first group without time) as the second result
type MeanAggregator ¶
type MeanAggregator struct { AbstractAggregator // contains filtered or unexported fields }
func (*MeanAggregator) AggregatePoint ¶
func (self *MeanAggregator) AggregatePoint(series string, group interface{}, p *protocol.Point) error
func (*MeanAggregator) ColumnNames ¶ added in v0.3.0
func (self *MeanAggregator) ColumnNames() []string
func (*MeanAggregator) GetValues ¶ added in v0.3.0
func (self *MeanAggregator) GetValues(series string, group interface{}) [][]*protocol.FieldValue
type ModeAggregator ¶
type ModeAggregator struct { AbstractAggregator // contains filtered or unexported fields }
func (*ModeAggregator) AggregatePoint ¶
func (self *ModeAggregator) AggregatePoint(series string, group interface{}, p *protocol.Point) error
func (*ModeAggregator) ColumnNames ¶ added in v0.3.0
func (self *ModeAggregator) ColumnNames() []string
func (*ModeAggregator) GetValues ¶ added in v0.3.0
func (self *ModeAggregator) GetValues(series string, group interface{}) [][]*protocol.FieldValue
type PassthroughEngine ¶ added in v0.5.0
type PassthroughEngine struct {
// contains filtered or unexported fields
}
func NewPassthroughEngine ¶ added in v0.5.0
func NewPassthroughEngine(responseChan chan *protocol.Response, maxPointsInResponse int) *PassthroughEngine
func (*PassthroughEngine) Close ¶ added in v0.5.0
func (self *PassthroughEngine) Close()
func (*PassthroughEngine) YieldPoint ¶ added in v0.5.0
type PercentileAggregator ¶
type PercentileAggregator struct { AbstractAggregator // contains filtered or unexported fields }
func (*PercentileAggregator) AggregatePoint ¶
func (self *PercentileAggregator) AggregatePoint(series string, group interface{}, p *protocol.Point) error
func (*PercentileAggregator) ColumnNames ¶ added in v0.3.0
func (self *PercentileAggregator) ColumnNames() []string
func (*PercentileAggregator) GetValues ¶ added in v0.3.0
func (self *PercentileAggregator) GetValues(series string, group interface{}) [][]*protocol.FieldValue
type PointFilter ¶ added in v0.5.0
type PointFilter struct {
// contains filtered or unexported fields
}
Pair this with a query on a specific series for queries with a where clause
func NewPointFilter ¶ added in v0.5.0
func NewPointFilter(query *parser.SelectQuery, queryColumnNames []string) *PointFilter
type PointRange ¶ added in v0.4.0
type PointRange struct {
// contains filtered or unexported fields
}
func (*PointRange) UpdateRange ¶ added in v0.4.0
func (self *PointRange) UpdateRange(point *protocol.Point)
type PointSlice ¶
type QueryEngine ¶
type QueryEngine struct {
// contains filtered or unexported fields
}
func NewQueryEngine ¶
func NewQueryEngine(query *parser.SelectQuery, responseChan chan *protocol.Response) *QueryEngine
func (*QueryEngine) Close ¶ added in v0.5.0
func (self *QueryEngine) Close()
func (*QueryEngine) YieldPoint ¶ added in v0.5.0
func (self *QueryEngine) YieldPoint(seriesName *string, fieldNames []string, point *protocol.Point) (shouldContinue bool)
Returns false if the query should be stopped (either because of limit or error)
type SortableGroups ¶ added in v0.2.0
type StandardDeviationAggregator ¶ added in v0.0.9
type StandardDeviationAggregator struct { AbstractAggregator // contains filtered or unexported fields }
func (*StandardDeviationAggregator) AggregatePoint ¶ added in v0.0.9
func (self *StandardDeviationAggregator) AggregatePoint(series string, group interface{}, p *protocol.Point) error
func (*StandardDeviationAggregator) ColumnNames ¶ added in v0.3.0
func (self *StandardDeviationAggregator) ColumnNames() []string
func (*StandardDeviationAggregator) GetValues ¶ added in v0.3.0
func (self *StandardDeviationAggregator) GetValues(series string, group interface{}) [][]*protocol.FieldValue
type StandardDeviationRunning ¶ added in v0.0.9
type StandardDeviationRunning struct {
// contains filtered or unexported fields
}
type TimestampAggregator ¶
type TimestampAggregator struct {
// contains filtered or unexported fields
}
func (*TimestampAggregator) AggregatePoint ¶
func (self *TimestampAggregator) AggregatePoint(series string, group interface{}, p *protocol.Point) error
func (*TimestampAggregator) ColumnNames ¶ added in v0.3.0
func (self *TimestampAggregator) ColumnNames() []string
func (*TimestampAggregator) GetValues ¶ added in v0.3.0
func (self *TimestampAggregator) GetValues(series string, group interface{}) [][]*protocol.FieldValue
func (*TimestampAggregator) InitializeFieldsMetadata ¶
func (self *TimestampAggregator) InitializeFieldsMetadata(series *protocol.Series) error
Click to show internal directories.
Click to hide internal directories.