Documentation ¶
Index ¶
- type AggrType
- type AggregateSeries
- func (as *AggregateSeries) CanAggregate(partitionAggr AggrType) bool
- func (as *AggregateSeries) GetAggrMask() AggrType
- func (as *AggregateSeries) GetAttrNames() []string
- func (as *AggregateSeries) GetFunctions() []AggrType
- func (as *AggregateSeries) NewSetFromAttrs(length, start, end int, mint, maxt int64, attrs *map[string]interface{}) (*AggregateSet, error)
- func (as *AggregateSeries) NewSetFromChunks(length int) *AggregateSet
- func (as *AggregateSeries) NumFunctions() int
- type AggregateSet
- type Aggregator
- type AggregatorList
- func (a AggregatorList) Aggregate(t int64, val interface{})
- func (a AggregatorList) Clear()
- func (a AggregatorList) InitExpr(col string, buckets int) string
- func (a AggregatorList) SetExpr(col string, bucket int) string
- func (a AggregatorList) SetOrUpdateExpr(col string, bucket int, isNew bool) string
- func (a AggregatorList) UpdateExpr(col string, bucket int) string
- type CountAggregator
- func (a *CountAggregator) Aggregate(t int64, v float64)
- func (a *CountAggregator) Clear()
- func (a *CountAggregator) GetAttr() string
- func (a *CountAggregator) InitExpr(col string, buckets int) string
- func (a *CountAggregator) SetExpr(col string, bucket int) string
- func (a *CountAggregator) UpdateExpr(col string, bucket int) string
- type FloatAggregator
- func (a *FloatAggregator) Clear()
- func (a *FloatAggregator) GetAttr() string
- func (a *FloatAggregator) GetVal() float64
- func (a *FloatAggregator) InitExpr(col string, buckets int) string
- func (a *FloatAggregator) SetExpr(col string, bucket int) string
- func (a *FloatAggregator) UpdateExpr(col string, bucket int) string
- type LastAggregator
- type MaxAggregator
- type MinAggregator
- type SqrAggregator
- type SumAggregator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggrType ¶
type AggrType uint16
func AggrsFromString ¶
convert comma separated string to aggregator mask
type AggregateSeries ¶
type AggregateSeries struct {
// contains filtered or unexported fields
}
func NewAggregateSeries ¶
func (*AggregateSeries) CanAggregate ¶
func (as *AggregateSeries) CanAggregate(partitionAggr AggrType) bool
func (*AggregateSeries) GetAggrMask ¶
func (as *AggregateSeries) GetAggrMask() AggrType
func (*AggregateSeries) GetAttrNames ¶
func (as *AggregateSeries) GetAttrNames() []string
func (*AggregateSeries) GetFunctions ¶
func (as *AggregateSeries) GetFunctions() []AggrType
func (*AggregateSeries) NewSetFromAttrs ¶
func (as *AggregateSeries) NewSetFromAttrs( length, start, end int, mint, maxt int64, attrs *map[string]interface{}) (*AggregateSet, error)
create new aggregation set from v3io aggregation array attributes
func (*AggregateSeries) NewSetFromChunks ¶
func (as *AggregateSeries) NewSetFromChunks(length int) *AggregateSet
prepare new aggregation set from v3io raw chunk attributes (in case there are no aggregation arrays)
func (*AggregateSeries) NumFunctions ¶
func (as *AggregateSeries) NumFunctions() int
type AggregateSet ¶
type AggregateSet struct {
// contains filtered or unexported fields
}
func (*AggregateSet) AppendAllCells ¶
func (as *AggregateSet) AppendAllCells(cell int, val float64)
append the value to a cell in all relevant aggregation arrays
func (*AggregateSet) Clear ¶
func (as *AggregateSet) Clear()
func (*AggregateSet) GetCellTime ¶
func (as *AggregateSet) GetCellTime(base int64, index int) int64
get the time per aggregate cell
func (*AggregateSet) GetCellValue ¶
func (as *AggregateSet) GetCellValue(aggr AggrType, cell int) float64
return the value per aggregate or complex function
func (*AggregateSet) GetMaxCell ¶
func (as *AggregateSet) GetMaxCell() int
type Aggregator ¶
type AggregatorList ¶
type AggregatorList []Aggregator
list of aggregators
func NewAggregatorList ¶
func NewAggregatorList(aggrType AggrType) *AggregatorList
create list of aggregator objects from aggregator mask
func (AggregatorList) Aggregate ¶
func (a AggregatorList) Aggregate(t int64, val interface{})
append value to all aggregators
func (AggregatorList) InitExpr ¶
func (a AggregatorList) InitExpr(col string, buckets int) string
return array init expression
func (AggregatorList) SetOrUpdateExpr ¶
func (a AggregatorList) SetOrUpdateExpr(col string, bucket int, isNew bool) string
return set (first value) or update expression for aggregators
func (AggregatorList) UpdateExpr ¶
func (a AggregatorList) UpdateExpr(col string, bucket int) string
return update expression for aggregators
type CountAggregator ¶
type CountAggregator struct {
// contains filtered or unexported fields
}
Count aggregator
func (*CountAggregator) Aggregate ¶
func (a *CountAggregator) Aggregate(t int64, v float64)
func (*CountAggregator) Clear ¶
func (a *CountAggregator) Clear()
func (*CountAggregator) GetAttr ¶
func (a *CountAggregator) GetAttr() string
func (*CountAggregator) InitExpr ¶
func (a *CountAggregator) InitExpr(col string, buckets int) string
func (*CountAggregator) UpdateExpr ¶
func (a *CountAggregator) UpdateExpr(col string, bucket int) string
type FloatAggregator ¶
type FloatAggregator struct {
// contains filtered or unexported fields
}
base float64 Aggregator
func (*FloatAggregator) Clear ¶
func (a *FloatAggregator) Clear()
func (*FloatAggregator) GetAttr ¶
func (a *FloatAggregator) GetAttr() string
func (*FloatAggregator) GetVal ¶
func (a *FloatAggregator) GetVal() float64
func (*FloatAggregator) InitExpr ¶
func (a *FloatAggregator) InitExpr(col string, buckets int) string
func (*FloatAggregator) UpdateExpr ¶
func (a *FloatAggregator) UpdateExpr(col string, bucket int) string
type LastAggregator ¶
type LastAggregator struct { FloatAggregator // contains filtered or unexported fields }
Last value Aggregator
func (*LastAggregator) Aggregate ¶
func (a *LastAggregator) Aggregate(t int64, v float64)
func (*LastAggregator) Clear ¶
func (a *LastAggregator) Clear()
func (*LastAggregator) UpdateExpr ¶
func (a *LastAggregator) UpdateExpr(col string, bucket int) string
type MaxAggregator ¶
type MaxAggregator struct{ FloatAggregator }
Maximum Aggregator
func (*MaxAggregator) Aggregate ¶
func (a *MaxAggregator) Aggregate(t int64, v float64)
func (*MaxAggregator) Clear ¶
func (a *MaxAggregator) Clear()
func (*MaxAggregator) UpdateExpr ¶
func (a *MaxAggregator) UpdateExpr(col string, bucket int) string
type MinAggregator ¶
type MinAggregator struct{ FloatAggregator }
Minimum Aggregator
func (*MinAggregator) Aggregate ¶
func (a *MinAggregator) Aggregate(t int64, v float64)
func (*MinAggregator) Clear ¶
func (a *MinAggregator) Clear()
func (*MinAggregator) UpdateExpr ¶
func (a *MinAggregator) UpdateExpr(col string, bucket int) string
type SqrAggregator ¶
type SqrAggregator struct{ FloatAggregator }
Power of 2 Aggregator
func (*SqrAggregator) Aggregate ¶
func (a *SqrAggregator) Aggregate(t int64, v float64)
type SumAggregator ¶
type SumAggregator struct{ FloatAggregator }
Sum Aggregator
func (*SumAggregator) Aggregate ¶
func (a *SumAggregator) Aggregate(t int64, v float64)