Documentation
¶
Index ¶
- Constants
- func AggregatesToStringList(aggregates string) ([]string, error)
- func SchemaFieldFromString(aggregates []string, col string) ([]config.SchemaField, error)
- type AggrType
- type Aggregate
- 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
- func (as *AggregateSet) AppendAllCells(cell int, val float64)
- func (as *AggregateSet) Clear()
- func (as *AggregateSet) DoesCellHaveData(cell int) bool
- func (as *AggregateSet) GetCellTime(base int64, index int) int64
- func (as *AggregateSet) GetCellValue(aggr AggrType, cell int) (float64, bool)
- func (as *AggregateSet) GetMaxCell() int
- type AggregatesList
- func (a AggregatesList) Aggregate(t int64, val interface{})
- func (a AggregatesList) Clear()
- func (a AggregatesList) InitExpr(col string, buckets int) string
- func (a AggregatesList) SetExpr(col string, bucket int) string
- func (a AggregatesList) SetOrUpdateExpr(col string, bucket int, isNew bool) string
- func (a AggregatesList) UpdateExpr(col string, bucket int) string
- type CountAggregate
- func (a *CountAggregate) Aggregate(t int64, v float64)
- func (a *CountAggregate) Clear()
- func (a *CountAggregate) GetAttr() string
- func (a *CountAggregate) InitExpr(col string, buckets int) string
- func (a *CountAggregate) SetExpr(col string, bucket int) string
- func (a *CountAggregate) UpdateExpr(col string, bucket int) string
- type FloatAggregate
- func (a *FloatAggregate) Clear()
- func (a *FloatAggregate) GetAttr() string
- func (a *FloatAggregate) GetVal() float64
- func (a *FloatAggregate) InitExpr(col string, buckets int) string
- func (a *FloatAggregate) SetExpr(col string, bucket int) string
- func (a *FloatAggregate) UpdateExpr(col string, bucket int) string
- type LastAggregate
- type MaxAggregate
- type MinAggregate
- type SqrAggregate
- type SumAggregate
Constants ¶
const (
AggregateLabel = "Aggregate"
)
Aggregation functions
Variables ¶
This section is empty.
Functions ¶
func AggregatesToStringList ¶ added in v0.0.13
func SchemaFieldFromString ¶ added in v0.0.3
func SchemaFieldFromString(aggregates []string, col string) ([]config.SchemaField, error)
Types ¶
type AggrType ¶
type AggrType uint16
func AggrsFromString ¶
Convert a comma-separated aggregation-functions string to an aggregates mask
func (AggrType) HasAverage ¶ added in v0.0.12
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) DoesCellHaveData ¶ added in v0.0.12
func (as *AggregateSet) DoesCellHaveData(cell int) bool
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, bool)
return the value per aggregate or complex function
func (*AggregateSet) GetMaxCell ¶
func (as *AggregateSet) GetMaxCell() int
type AggregatesList ¶ added in v0.0.13
type AggregatesList []Aggregate
List of aggregates
func NewAggregatesList ¶ added in v0.0.13
func NewAggregatesList(aggrType AggrType) *AggregatesList
Create a list of aggregate objects from an aggregates mask
func (AggregatesList) Aggregate ¶ added in v0.0.13
func (a AggregatesList) Aggregate(t int64, val interface{})
Append a value to all aggregates
func (AggregatesList) InitExpr ¶ added in v0.0.13
func (a AggregatesList) InitExpr(col string, buckets int) string
Return an aggregates array-initialization expression
func (AggregatesList) SetExpr ¶ added in v0.0.13
func (a AggregatesList) SetExpr(col string, bucket int) string
func (AggregatesList) SetOrUpdateExpr ¶ added in v0.0.13
func (a AggregatesList) SetOrUpdateExpr(col string, bucket int, isNew bool) string
Return an aggregates set expression (first value) or update expression
func (AggregatesList) UpdateExpr ¶ added in v0.0.13
func (a AggregatesList) UpdateExpr(col string, bucket int) string
Return an update expression for the aggregates in the given aggregates list
type CountAggregate ¶ added in v0.0.13
type CountAggregate struct {
// contains filtered or unexported fields
}
Count aggregate
func (*CountAggregate) Aggregate ¶ added in v0.0.13
func (a *CountAggregate) Aggregate(t int64, v float64)
func (*CountAggregate) Clear ¶ added in v0.0.13
func (a *CountAggregate) Clear()
func (*CountAggregate) GetAttr ¶ added in v0.0.13
func (a *CountAggregate) GetAttr() string
func (*CountAggregate) InitExpr ¶ added in v0.0.13
func (a *CountAggregate) InitExpr(col string, buckets int) string
func (*CountAggregate) SetExpr ¶ added in v0.0.13
func (a *CountAggregate) SetExpr(col string, bucket int) string
func (*CountAggregate) UpdateExpr ¶ added in v0.0.13
func (a *CountAggregate) UpdateExpr(col string, bucket int) string
type FloatAggregate ¶ added in v0.0.13
type FloatAggregate struct {
// contains filtered or unexported fields
}
base float64 Aggregate
func (*FloatAggregate) Clear ¶ added in v0.0.13
func (a *FloatAggregate) Clear()
func (*FloatAggregate) GetAttr ¶ added in v0.0.13
func (a *FloatAggregate) GetAttr() string
func (*FloatAggregate) GetVal ¶ added in v0.0.13
func (a *FloatAggregate) GetVal() float64
func (*FloatAggregate) InitExpr ¶ added in v0.0.13
func (a *FloatAggregate) InitExpr(col string, buckets int) string
func (*FloatAggregate) SetExpr ¶ added in v0.0.13
func (a *FloatAggregate) SetExpr(col string, bucket int) string
func (*FloatAggregate) UpdateExpr ¶ added in v0.0.13
func (a *FloatAggregate) UpdateExpr(col string, bucket int) string
type LastAggregate ¶ added in v0.0.13
type LastAggregate struct { FloatAggregate // contains filtered or unexported fields }
Last value Aggregate
func (*LastAggregate) Aggregate ¶ added in v0.0.13
func (a *LastAggregate) Aggregate(t int64, v float64)
func (*LastAggregate) Clear ¶ added in v0.0.13
func (a *LastAggregate) Clear()
func (*LastAggregate) UpdateExpr ¶ added in v0.0.13
func (a *LastAggregate) UpdateExpr(col string, bucket int) string
type MaxAggregate ¶ added in v0.0.13
type MaxAggregate struct{ FloatAggregate }
Maximum Aggregate
func (*MaxAggregate) Aggregate ¶ added in v0.0.13
func (a *MaxAggregate) Aggregate(t int64, v float64)
func (*MaxAggregate) Clear ¶ added in v0.0.13
func (a *MaxAggregate) Clear()
func (*MaxAggregate) UpdateExpr ¶ added in v0.0.13
func (a *MaxAggregate) UpdateExpr(col string, bucket int) string
type MinAggregate ¶ added in v0.0.13
type MinAggregate struct{ FloatAggregate }
Minimum Aggregate
func (*MinAggregate) Aggregate ¶ added in v0.0.13
func (a *MinAggregate) Aggregate(t int64, v float64)
func (*MinAggregate) Clear ¶ added in v0.0.13
func (a *MinAggregate) Clear()
func (*MinAggregate) UpdateExpr ¶ added in v0.0.13
func (a *MinAggregate) UpdateExpr(col string, bucket int) string
type SqrAggregate ¶ added in v0.0.13
type SqrAggregate struct{ FloatAggregate }
Power of 2 Aggregate
func (*SqrAggregate) Aggregate ¶ added in v0.0.13
func (a *SqrAggregate) Aggregate(t int64, v float64)
type SumAggregate ¶ added in v0.0.13
type SumAggregate struct{ FloatAggregate }
Sum Aggregate
func (*SumAggregate) Aggregate ¶ added in v0.0.13
func (a *SumAggregate) Aggregate(t int64, v float64)