Registry / utility / throttled-throttled-v2

throttled-throttled-v2

JSON →
library2.15.0gogounverified

A Go package for rate limiting access to resources such as HTTP endpoints using various storage backends.

go get github.com/throttled/throttled/v2
INSTALL
IMPORT
SIG · THROTTLED-THROTTLE
T
throttled-throttled-v2
utilitygov2.15.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.

throttled
github.com/throttled/throttled/v2

Creates a rate limiter that allows 10 requests per second with a burst of 5.

package main import ( "fmt" "github.com/throttled/throttled/v2" "github.com/throttled/throttled/v2/store/memstore" ) func main() { store, _ := memstore.New(0) rateLimiter, _ := throttled.NewGCRARateLimiter(store, throttled.RateQuota{MaxRate: throttled.PerSec(10), MaxBurst: 5}) limited, _, _ := rateLimiter.RateLimit("user:123", 1) fmt.Println("Limited:", limited) }
Debug
Known issues

No known issues recorded.

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

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
throttled-throttled-v2 — go get throttled-throttled-v2 · libregistry