Documentation
¶
Index ¶
- Constants
- func AggregatesFromStringListWithCount(split []string) (AggrType, []AggrType, error)
- func ContainsAggregate(list []AggrType, item AggrType) bool
- func GetClientAggregationsFunction(aggr AggrType) (func(interface{}, interface{}) interface{}, error)
- func GetServerAggregationsFunction(aggr AggrType) (func(interface{}, interface{}) interface{}, error)
- func GetServerVirtualAggregationFunction(aggr AggrType) (func([]float64) float64, error)
- func HasAggregates(mask AggrType) bool
- func IsCountAggregate(aggr AggrType) bool
- func IsRawAggregate(item AggrType) bool
- func ParseCrossLabelSets(str string) [][]string
- func RawAggregatesToStringList(aggregates string) ([]string, error)
- func SchemaFieldFromString(aggregates []string, col string) ([]config.SchemaField, error)
- func ToAttrName(aggr AggrType) string
- 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) GetCellTime(base int64, index int) int64
- func (as *AggregateSet) GetCellValue(aggr AggrType, cell int) (float64, bool)
- func (as *AggregateSet) GetMaxCell() int
- func (as *AggregateSet) HasData(cell int) bool
- 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 AggregationParams
- 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" CrossSeriesSuffix = "_all" )
Aggregation functions
Variables ¶
This section is empty.
Functions ¶
func AggregatesFromStringListWithCount ¶ added in v0.8.3
Convert a comma-separated aggregation-functions string to an aggregates mask
func ContainsAggregate ¶ added in v0.8.3
func GetClientAggregationsFunction ¶ added in v0.8.3
func GetServerAggregationsFunction ¶ added in v0.8.3
func GetServerVirtualAggregationFunction ¶ added in v0.8.3
func HasAggregates ¶ added in v0.8.3
func IsCountAggregate ¶ added in v0.8.3
func IsRawAggregate ¶ added in v0.8.3
func ParseCrossLabelSets ¶ added in v0.8.8
func RawAggregatesToStringList ¶ added in v0.8.3
func SchemaFieldFromString ¶ added in v0.0.3
func SchemaFieldFromString(aggregates []string, col string) ([]config.SchemaField, error)
func ToAttrName ¶ added in v0.8.3
Types ¶
type AggrType ¶
type AggrType uint16
func AggregateFromString ¶ added in v0.8.3
func GetDependantAggregates ¶ added in v0.8.3
func GetHiddenAggregates ¶ added in v0.8.3
func GetHiddenAggregatesWithCount ¶ added in v0.8.3
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) 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
func (*AggregateSet) HasData ¶ added in v0.8.0
func (as *AggregateSet) HasData(cell int) bool
Check if cell has data. Assumes that count is always present
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 AggregationParams ¶ added in v0.8.3
type AggregationParams struct { Interval int64 // requested (query) aggregation step // contains filtered or unexported fields }
func NewAggregationParams ¶ added in v0.8.3
func (*AggregationParams) CanAggregate ¶ added in v0.8.3
func (as *AggregationParams) CanAggregate(partitionAggr AggrType) bool
func (*AggregationParams) GetAggrMask ¶ added in v0.8.3
func (as *AggregationParams) GetAggrMask() AggrType
func (*AggregationParams) GetAttrNames ¶ added in v0.8.3
func (as *AggregationParams) GetAttrNames() []string
func (*AggregationParams) GetRollupTime ¶ added in v0.8.3
func (as *AggregationParams) GetRollupTime() int64
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)