limit

package
v0.0.0-...-1a5aa5f Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2017 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthUserID

func AuthUserID(r *http.Request) string

func Handler

func Handler(next, limited http.Handler, freq, burst int, f func(*http.Request) string) http.Handler

func RemoteAddrID

func RemoteAddrID(r *http.Request) string

Types

type BucketLimiter

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

func NewBucketLimiter

func NewBucketLimiter(freq, burst int) *BucketLimiter

func (*BucketLimiter) Allow

func (b *BucketLimiter) Allow(id string) bool

Jump to

Keyboard shortcuts

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