limiterx

package
v0.0.0-...-d763768 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalLimiters = &Limiters{
	limiters: &sync.Map{},
}

Functions

This section is empty.

Types

type Limiter

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

func NewLimiter

func NewLimiter(interval time.Duration, burst int, key string) *Limiter

func (*Limiter) Allow

func (limit *Limiter) Allow() bool

type Limiters

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

Jump to

Keyboard shortcuts

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