Registry /
utility / chimeracoder-tokenbucket
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.
tokenbucket
✓ github.com/ChimeraCoder/tokenbucket
Creates a token bucket and takes one token.
package main
import (
"fmt"
"time"
"github.com/ChimeraCoder/tokenbucket"
)
func main() {
bucket := tokenbucket.NewBucket(10*time.Second, 10)
fmt.Println(bucket.TakeAvailable(1))
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.0-20131201223612-c5a927568de7latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.