limiter

package
v0.0.0-...-c6f1323 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: GPL-3.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 Limiter

type Limiter struct {
	// contains filtered or unexported fields
}

Limiter 限流器对象

func NewLimiter

func NewLimiter(cnt int64) *Limiter

NewLimiter 产生一个限流器

func (*Limiter) Ok

func (l *Limiter) Ok() bool

Ok 是否可以通过

func (*Limiter) SetMax

func (l *Limiter) SetMax(m int64)

SetMax 设置最大限制

Jump to

Keyboard shortcuts

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