CoreRunCache

package
v5.2.34 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blocker

type Blocker struct {
	//数据编辑次数
	EditCount int
	//锁定机制
	Lock sync.Mutex
	//上次通行时间
	LastPassTimeUnix int64
	//阻断间隔时间
	ExpireSec int64
}

Blocker 阻断器

func (*Blocker) CheckPass

func (t *Blocker) CheckPass() bool

CheckPass 检查阻断次数

func (*Blocker) NewEdit

func (t *Blocker) NewEdit()

NewEdit 编辑一次数据

func (*Blocker) SetExpire

func (t *Blocker) SetExpire(sec int64)

SetExpire 设置阻断器过期时间

Jump to

Keyboard shortcuts

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