Registry / web-framework / didip-tollbooth-v5

didip-tollbooth-v5

JSON →
library5.2.0gogounverified

Package tollbooth provides rate-limiting logic to HTTP request handler.

go get github.com/didip/tollbooth/v5
INSTALL
IMPORT
SIG · DIDIP-TOLLBOOTH-V5
D
didip-tollbooth-v5
web-frameworkgov5.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

tollbooth
github.com/didip/tollbooth/v5

Create a rate-limited HTTP handler with Tollbooth.

package main import ( "net/http" "github.com/didip/tollbooth/v5" ) func main() { limiter := tollbooth.NewLimiter(1, nil) http.Handle("/", tollbooth.LimitFuncHandler(limiter, func(w http.ResponseWriter, r *http.Request) { w.Write([]byte("Hello")) })) http.ListenAndServe(":8080", nil) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
5.2.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
didip-tollbooth-v5 — go get didip-tollbooth-v5 · libregistry