Skip to content

Commit

Permalink
feat(http-ratelimiting)!: rewrite crate
Browse files Browse the repository at this point in the history
Support buckets and global limit. Work in progress...
  • Loading branch information
Tim Vilgot Mikael Fredenberg committed Feb 9, 2025
1 parent 4507b77 commit 0e46df7
Show file tree
Hide file tree
Showing 11 changed files with 690 additions and 835 deletions.
2 changes: 1 addition & 1 deletion examples/http-proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async fn main() -> anyhow::Result<()> {

let client = Client::builder()
.proxy("localhost:3000".to_owned(), true)
.ratelimiter(None)
.ratelimiter(false)
.build();
let channel_id = Id::new(620_980_184_606_048_278);

Expand Down
4 changes: 3 additions & 1 deletion twilight-http-ratelimiting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ rust-version.workspace = true
version = "0.16.0"

[dependencies]
tokio = { version = "1", default-features = false, features = ["rt", "sync", "time"] }
hashbrown = { default-features = false, version = "0.15"}
tokio = { default-features = false, features = ["macros", "rt", "sync", "time"], version = "1" }
tokio-util = { default-features = false, features = ["time"], version = "0.7.11" }
tracing = { default-features = false, features = ["std", "attributes"], version = "0.1.23" }

[dev-dependencies]
Expand Down
324 changes: 0 additions & 324 deletions twilight-http-ratelimiting/src/in_memory/bucket.rs

This file was deleted.

Loading

0 comments on commit 0e46df7

Please sign in to comment.