philiprehberger_rate_limiter 0.6.0
philiprehberger_rate_limiter: ^0.6.0 copied to clipboard
Token bucket, sliding window, and fixed window rate limiting for async operations
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased] #
0.6.0 - 2026-04-17 #
Added #
dispose()method on all rate limiters to release timers and internal stateisDisposedgetter to check disposal status
0.5.0 - 2026-04-12 #
Added #
CompositeRateLimiterfor combining multiple rate limiters with multi-tier enforcement
0.4.0 - 2026-04-11 #
0.3.0 - 2026-04-05 #
Added #
isExhausted()method on all rate limiters that returnstruewhen no permits remain
0.2.0 - 2026-04-04 #
Added #
FixedWindowrate limiter with simple window-based counting- Optional
timeoutparameter onacquire()that throwsTimeoutException stats()method for tracking total, allowed, and rejected request countsavailablePermits()to check remaining capacity without consuming a permitRateLimiterStatsclass for structured statistics access
0.1.0 - 2026-04-03 #
Added #
- Initial release
- Token bucket rate limiter with configurable capacity and refill interval
- Sliding window rate limiter with configurable max requests and window duration
- Per-key rate limiting support for both algorithms
- Async
acquiremethod that waits until a permit is available - Non-blocking
tryAcquiremethod for immediate checks resetmethod to clear rate limiter state