package
Version:
v1.15.0
Opens a new window with list of versions in this module.
Published: Aug 26, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package ratelimit implements a sliding-window request limiter.
Limiter admits at most rpm requests per rolling minute.
New returns a limiter admitting rpm requests per minute.
rpm <= 0 returns nil, which Allow treats as unlimited.
Allow reports whether one more request fits in the window and, when it
does not, how long the caller should wait before retrying.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.