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 1, 2025
1 parent 4507b77 commit d8eff68
Show file tree
Hide file tree
Showing 7 changed files with 549 additions and 37 deletions.
3 changes: 3 additions & 0 deletions twilight-http-ratelimiting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ rust-version.workspace = true
version = "0.16.0"

[dependencies]
hashbrown = "0.15.2"
pin-project-lite = "0.2.16"
tokio = { version = "1", default-features = false, features = ["rt", "sync", "time"] }
tokio-util = { version = "0.7.13", features = ["time"] }
tracing = { default-features = false, features = ["std", "attributes"], version = "0.1.23" }

[dev-dependencies]
Expand Down
2 changes: 2 additions & 0 deletions twilight-http-ratelimiting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@

pub mod headers;
pub mod in_memory;
mod ratelimiter;
pub mod request;
pub mod ticket;

pub use self::{
headers::RatelimitHeaders,
in_memory::InMemoryRatelimiter,
ratelimiter::{Headers, InMemoryQueue},
request::{Method, Path},
};

Expand Down
Loading

0 comments on commit d8eff68

Please sign in to comment.