Expose ToketBucket as a standalone component
roma-glushko opened this issue · comments
The hyx.ratelimit package provides TokenBucketLimiter
component:
Line 12 in 365a280
Its API is rather simplistic and hard to reuse if you want to pull that bucket logic to reuse somewhere (for example, to implement a custom bucket retry).
Let's refactor the TokenBucket logic out of the ratelimiter and expose it outside of Hyx, so other projects could import it.