| Crates.io | weighted_rate_limiter |
| lib.rs | weighted_rate_limiter |
| version | 0.2.0 |
| created_at | 2024-04-06 16:23:29.437293+00 |
| updated_at | 2024-07-29 11:26:07.477078+00 |
| description | A weighted rate limiter |
| homepage | |
| repository | https://github.com/BenD0G/weighted_rate_limiter |
| max_upload_size | |
| id | 1198393 |
| size | 45,972 |
Some API's have usage limits where different endpoints or actions have different costs - this is often implemented as the caller having a certain amount of weight that they are allowed to use per a given time period. This crate allows you to implement a rate limiter that enforces these limits - more specifically by queueing up futures that will be executed when the weight becomes available.
See docs.rs for usage.
This crate is very new, and has not been thoroughly tested.