Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AggregationOverTime = map[AggregateFunction]string{ MaxOverTime: "max_over_time", AvgOverTime: "avg_over_time", } TimeRange2AggregationOverTime = map[Common.TimeRange_AggregateFunction]AggregateFunction{ Common.TimeRange_NONE: None, Common.TimeRange_MAX: MaxOverTime, Common.TimeRange_AVG: AvgOverTime, } )
View Source
var (
DefaultStepTime, _ = time.ParseDuration("30s")
)
Functions ¶
This section is empty.
Types ¶
type AggregateFunction ¶
type AggregateFunction = int
Aggregate function enumerator
const ( None AggregateFunction = 0 MaxOverTime AggregateFunction = 1 AvgOverTime AggregateFunction = 2 )
Aggregation function definition
type Option ¶
type Option func(*Options)
func AggregateOverTimeFunc ¶
func AggregateOverTimeFunc(f AggregateFunction) Option
type Options ¶
type Options struct { StartTime *time.Time EndTime *time.Time Timeout *time.Time StepTime *time.Duration AggregateOverTimeFunc AggregateFunction }
func NewDefaultOptions ¶
func NewDefaultOptions() Options
type QueryCondition ¶
type QueryCondition struct { StartTime *time.Time EndTime *time.Time Timeout *time.Time StepTime *time.Duration TimestampOrder Order Limit int AggregateOverTimeFunction AggregateFunction }
QueryCondition Others query condition
func BuildQueryCondition ¶
func BuildQueryCondition(condition *Common.QueryCondition) QueryCondition
func BuildQueryConditionV1 ¶
func BuildQueryConditionV1(condition *ApiCommon.QueryCondition) *QueryCondition
func NewQueryCondition ¶ added in v0.9.166
func NewQueryCondition(days, hours, seconds, steps int) *QueryCondition
Click to show internal directories.
Click to hide internal directories.