aggregator

package
v4.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorBlank = errors.New("无数据")

Functions

func Start

func Start()

Types

type Aggregator

type Aggregator 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"`     //赋值
}

type Instance added in v4.0.18

type Instance interface {
	Compile(expression string) error
	Push(ctx map[string]interface{}) error
	Pop() (float64, error)
}

func New

func New(m *Aggregator, pop func(float64, error)) (agg Instance, err error)

New 新建

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL