antifuchs / ratelimit_meter

A leaky-bucket-as-a-meter rate-limiting implementation in Rust
MIT License
33 stars 6 forks source link

Change the interface to support by-key rate limiting #21

Closed antifuchs closed 6 years ago

antifuchs commented 6 years ago

The internal and external interface in ratelimit_meter has long been a thorn in my thigh: We have three implementations of state-keeping (two really, the Allower almost doesn't count), and using ratelimit_meter means having to import traits left and right.

Well, this PR changes all that! It: