This is a Go library that implements a leaky-bucket algorithm to control the frequency of operations and requests per second. It serves as a concurrent request throttler that blocks calling threads until request slots become available to maintain a steady execution rate.
The project includes a traffic burst controller that allows the accumulation of unspent request capacity, permitting short-term spikes in volume while maintaining a defined long-term average rate.
The library provides capabilities for operation frequency limiting, request interval enforcement, and application resource protection. It also includes a deterministic time simulator and mock clock utilities to verify timing logic and rate limiting behavior without waiting for real-time intervals.