RateLimiter

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2022 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOptions

func NewOptions(args ...string) *options

Types

type Limiter

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

func New

func New(id string, count int, duration interface{}, opts ...*options) *Limiter

func (*Limiter) GetLimit

func (l *Limiter) GetLimit() map[string]interface{}

func (*Limiter) IsReachRateLimit

func (l *Limiter) IsReachRateLimit() bool

Jump to

Keyboard shortcuts

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