Registry / web-framework / didip-tollbooth-v6

didip-tollbooth-v6

JSON →
library6.1.2gogounverified

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

go get github.com/didip/tollbooth/v6
INSTALL
IMPORT
SIG · DIDIP-TOLLBOOTH-V6
D
didip-tollbooth-v6
web-frameworkgov6.1.2
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/v6

Create a rate-limited HTTP handler

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

No known issues recorded.

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

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
didip-tollbooth-v6 — go get didip-tollbooth-v6 · libregistry