Created
March 29, 2022 20:56
-
-
Save jayhuang75/69da6c2c661684df00f09584ccf47b48 to your computer and use it in GitHub Desktop.
token_bucket_struct
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pub struct TokenBucket { | |
| rate: i64, | |
| max_tokens: i64, | |
| current_tokens: i64, | |
| last_refill_timestamp: DateTime<Utc>, | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment