#rate #token-bucket #rate-limiting #limit #bucket #token

rate_limit

A simple token-bucket style rate limiter

2 releases

0.1.1 Jul 30, 2019
0.1.0 Jul 30, 2019

#10 in #token-bucket

Download history 13/week @ 2024-03-11 11/week @ 2024-03-18 23/week @ 2024-03-25 41/week @ 2024-04-01 11/week @ 2024-04-08 14/week @ 2024-04-15 13/week @ 2024-04-22 10/week @ 2024-04-29 6/week @ 2024-05-06 16/week @ 2024-05-13 18/week @ 2024-05-20 23/week @ 2024-05-27 15/week @ 2024-06-03 32/week @ 2024-06-10 10/week @ 2024-06-17 25/week @ 2024-06-24

87 downloads per month
Used in 2 crates

0BSD license

11KB
157 lines

rate_limit

rate_limit

This is a simple token-butcket style rate limiter

It provides neat features like an estimate of the next block

and possible inverse of the bucket (filling vs draining)

this provides both thread-safe and non-thread-safe versions


lib.rs:

rate_limit

This is a simple token-butcket style rate limiter

It provides neat features like an estimate of the next block

and possible inverse of the bucket (filling vs draining)

this provides both thread-safe and non-thread-safe versions

No runtime deps