ratelimit

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	sync.Mutex
	// contains filtered or unexported fields
}

type RateLimitingMiddleware

type RateLimitingMiddleware interface {
	DecorateHandler(handler httprouter.Handle) httprouter.Handle
}

func NewRateLimiter

func NewRateLimiter(cfg config.RateLimiting, red *redis.Pool, logger *logging.Logger) (RateLimitingMiddleware, error)

type RedisSimpleRateThrottler

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

func (*RedisSimpleRateThrottler) DecorateHandler

func (t *RedisSimpleRateThrottler) DecorateHandler(handler httprouter.Handle) httprouter.Handle

Jump to

Keyboard shortcuts

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