diff --git a/docs/quick_start.md b/docs/quick_start.md index 329a5be4..73124866 100644 --- a/docs/quick_start.md +++ b/docs/quick_start.md @@ -19,7 +19,8 @@ cargo new load_balancer In your project's `cargo.toml` file add the following to your dependencies ``` async-trait="0.1" -pingora = { version = "0.3", features = [ "lb" ] } +pingora = { version = "0.8.0", features = ["openssl", "lb"] } + ``` ### Create a pingora server @@ -321,4 +322,4 @@ The full code for this example is available in this repository under Other examples that you may find helpful are also available here [pingora-proxy/examples/](../pingora-proxy/examples/) -[pingora/examples](../pingora/examples/) \ No newline at end of file +[pingora/examples](../pingora/examples/) diff --git a/docs/user_guide/rate_limiter.md b/docs/user_guide/rate_limiter.md index 31a6b5a9..554d23a6 100644 --- a/docs/user_guide/rate_limiter.md +++ b/docs/user_guide/rate_limiter.md @@ -5,8 +5,8 @@ Pingora provides a crate `pingora-limits` which provides a simple and easy to us 1. Add the following dependencies to your `Cargo.toml`: ```toml async-trait="0.1" - pingora = { version = "0.3", features = [ "lb" ] } - pingora-limits = "0.3.0" + pingora = { version = "0.8", features = [ "lb", "openssl" ] } + pingora-limits = "0.8.0" once_cell = "1.19.0" ``` 2. Declare a global rate limiter map to store the rate limiter for each client. In this example, we use `appid`. @@ -20,6 +20,7 @@ Pingora provides a crate `pingora-limits` which provides a simple and easy to us ```rust use async_trait::async_trait; use once_cell::sync::Lazy; +use pingora::http::ResponseHeader; use pingora::prelude::*; use pingora_limits::rate::Rate; use std::sync::Arc; diff --git a/pingora-proxy/examples/connection_filter.rs b/pingora-proxy/examples/connection_filter.rs index 1c346c6f..540cc843 100644 --- a/pingora-proxy/examples/connection_filter.rs +++ b/pingora-proxy/examples/connection_filter.rs @@ -49,7 +49,7 @@ struct BlockAllFilter; #[async_trait] impl ConnectionFilter for BlockAllFilter { - async fn should_accept(&self, addr: &std::net::SocketAddr) -> bool { + fn should_accept(&self, addr: &std::net::SocketAddr) -> bool { info!("BLOCKING connection from {} (BlockAllFilter active)", addr); false }