Documentation ¶ Index ¶ Variables func Start() type Aggregator func New(m *Model, pop func(float64, error)) (agg Aggregator, err error) type Model Constants ¶ This section is empty. Variables ¶ View Source var ErrorBlank = errors.New("无数据") Functions ¶ func Start ¶ func Start() Types ¶ type Aggregator ¶ type Aggregator interface { Compile(expression string) error Push(ctx map[string]interface{}) error Pop() (float64, error) } func New ¶ func New(m *Model, pop func(float64, error)) (agg Aggregator, err error) New 新建 type Model ¶ type Model struct { Crontab string `json:"crontab"` //定时计划 Expression string `json:"expression"` //表达式 Type string `json:"type"` //聚合算法 inc dec avg count min max sum last first Assign string `json:"assign"` //赋值 } Source Files ¶ View all Source files aggregator.go avg.go base.go count.go dec.go first.go inc.go job.go last.go max.go min.go sum.go Click to show internal directories. Click to hide internal directories.