Documentation
¶
Overview ¶
Copyright 2018 Iguazio Systems Ltd.
Licensed under the Apache License, Version 2.0 (the "License") with an addition restriction as set forth herein. You may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
In addition, you may not use the software for any purposes that are illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction.
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 MaskToString(mask AggrType) string
- func ParseCrossLabelSets(str string) [][]string
- func RawAggregatesToStringList(aggregates string) ([]string, error)
- func SchemaFieldFromString(aggregates []string, col string) ([]config.SchemaField, error)
- func ToAttrName(aggr fmt.Stringer) string
- type AggrType
- type Aggregate
- 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
- func (as *AggregationParams) CanAggregate(partitionAggr AggrType) bool
- func (as *AggregationParams) GetAggrMask() AggrType
- func (as *AggregationParams) GetAggregationWindow() int64
- func (as *AggregationParams) GetAttrNames() []string
- func (as *AggregationParams) GetRollupTime() int64
- func (as *AggregationParams) HasAggregationWindow() bool
- 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 Series
- func (as *Series) CanAggregate(partitionAggr AggrType) bool
- func (as *Series) GetAggrMask() AggrType
- func (as *Series) GetAttrNames() []string
- func (as *Series) GetFunctions() []AggrType
- func (as *Series) NewSetFromAttrs(length, start, end int, mint, maxt int64, attrs *map[string]interface{}) (*Set, error)
- func (as *Series) NewSetFromChunks(length int) *Set
- func (as *Series) NumFunctions() int
- type Set
- 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 MaskToString ¶ added in v0.9.15
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 FromString ¶ added in v0.9.15
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 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) GetAggregationWindow ¶ added in v0.9.0
func (as *AggregationParams) GetAggregationWindow() int64
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
func (*AggregationParams) HasAggregationWindow ¶ added in v0.9.0
func (as *AggregationParams) HasAggregationWindow() bool
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 Series ¶ added in v0.9.15
type Series struct {
// contains filtered or unexported fields
}
func NewAggregateSeries ¶
func (*Series) CanAggregate ¶ added in v0.9.15
func (*Series) GetAggrMask ¶ added in v0.9.15
func (*Series) GetAttrNames ¶ added in v0.9.15
func (*Series) GetFunctions ¶ added in v0.9.15
func (*Series) NewSetFromAttrs ¶ added in v0.9.15
func (as *Series) NewSetFromAttrs( length, start, end int, mint, maxt int64, attrs *map[string]interface{}) (*Set, error)
create new aggregation set from v3io aggregation array attributes
func (*Series) NewSetFromChunks ¶ added in v0.9.15
prepare new aggregation set from v3io raw chunk attributes (in case there are no aggregation arrays)
func (*Series) NumFunctions ¶ added in v0.9.15
type Set ¶ added in v0.9.15
type Set struct {
// contains filtered or unexported fields
}
func (*Set) AppendAllCells ¶ added in v0.9.15
append the value to a cell in all relevant aggregation arrays
func (*Set) GetCellTime ¶ added in v0.9.15
get the time per aggregate cell
func (*Set) GetCellValue ¶ added in v0.9.15
return the value per aggregate or complex function
func (*Set) GetMaxCell ¶ added in v0.9.15
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)