rl

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: MIT Imports: 4 Imported by: 0

README

rl

Straightforward Go ratelimiting middleware

GoDoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LimitWrap

func LimitWrap(d time.Duration, max int, handler http.HandlerFunc) http.HandlerFunc

LimitWrap wraps handler with a ratelimiter which counts requests and whose counter resets every d. Requests are rejected with a 429 status code after counter for a single IP exceeds d.

Types

This section is empty.

Jump to

Keyboard shortcuts

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