rate

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: Unlicense Imports: 3 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 is a set of rate limiters for specific ids.

func New

func New(every time.Duration, burst uint) *Limiter

New limiter for rate.

func (*Limiter) Limiter

func (u *Limiter) Limiter(id string) *rate.Limiter

Limiter that is specified for that id.

Jump to

Keyboard shortcuts

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