The highest tagged major version is
v2 .
Discover Packages
github.com/ethersphere/bee
pkg
ratelimit
package
Version:
v1.1.0-rc1
Opens a new window with list of versions in this module.
Published: Aug 3, 2021
License: BSD-3-Clause
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 2
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package ratelimit provides a mechanism to rate limit requests based on a string key,
refill rate and burst amount. Under the hood, it's a token bucket of size burst amount,
that refills at the refill rate.
New returns a new Limiter object with refresh rate and burst amount
Allow checks if the limiter that belongs to 'key' has not exceeded the limit.
Clear deletes the limiter that belongs to 'key'
Source Files
¶
Click to show internal directories.
Click to hide internal directories.