constrict

package
v0.0.0-...-07ef6c8 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: Artistic-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constrict

type Constrict interface {
	//characteristic代表特征,比如报警的内容。 interval是指多少时间内只能发送相同特征值的内容,单位是秒
	AddConstrictinInTime(characteristic string, interval int)
	//展示所有的任务
	String() string
	//特征值删除
	//DeleteConstirictin() error
	//
	Exists(characteristic string) bool
}

收敛,例如报警收敛,每1分钟智能报一条相同的报警

var GlobalConstictor Constrict

type Constrictor

type Constrictor struct {
	*sync.Mutex
	ConstrictionMap map[string]bool
}

func NewConstrictor

func NewConstrictor() *Constrictor

func (*Constrictor) AddConstrictinInTime

func (c *Constrictor) AddConstrictinInTime(characteristic string, interval int)

func (*Constrictor) Exists

func (c *Constrictor) Exists(characteristic string) bool

func (*Constrictor) String

func (c *Constrictor) String() string

Jump to

Keyboard shortcuts

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