Registry / utility / beefsack-go-rate

beefsack-go-rate

JSON →
library0.0.0-20220214233405-116f4ca011a0gogounverified

A rate limiter for Go that provides a simple interface for limiting the rate of operations.

go get github.com/beefsack/go-rate
INSTALL
IMPORT
SIG · BEEFSACK-GO-RATE
B
beefsack-go-rate
utilitygov0.0.0-20220214233405-116f4ca011a0
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.

rate
github.com/beefsack/go-rate

Creates a rate limiter allowing 10 operations per second and checks if an operation is allowed.

package main import ( "fmt" "github.com/beefsack/go-rate" ) func main() { r := rate.New(10, time.Second) if r.Try() { fmt.Println("Allowed") } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20220214233405-116f4ca011a0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
10
Meta
1
OpenAI (training)
1
Resources
beefsack-go-rate — go get beefsack-go-rate · libregistry