diff options
author | James Munns <[email protected]> | 2024-06-03 18:26:25 +0000 |
---|---|---|
committer | Gideon Tong <[email protected]> | 2024-06-14 16:00:03 -0700 |
commit | a432c2da9b71a2cf1e5169cabc1205cc272c4c9c (patch) | |
tree | 0a14bc0e0958d61064aeb045bc15d5201c788ed1 /pingora-load-balancing/src | |
parent | 70b027e9f88945ed833f0851abb338b3a3adc206 (diff) | |
download | pingora-a432c2da9b71a2cf1e5169cabc1205cc272c4c9c.tar.gz pingora-a432c2da9b71a2cf1e5169cabc1205cc272c4c9c.zip |
Fix a couple of typos/grammar issues
Diffstat (limited to 'pingora-load-balancing/src')
-rw-r--r-- | pingora-load-balancing/src/lib.rs | 6 | ||||
-rw-r--r-- | pingora-load-balancing/src/selection/mod.rs | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/pingora-load-balancing/src/lib.rs b/pingora-load-balancing/src/lib.rs index 60e30ed..c950c85 100644 --- a/pingora-load-balancing/src/lib.rs +++ b/pingora-load-balancing/src/lib.rs @@ -100,7 +100,7 @@ impl std::net::ToSocketAddrs for Backend { /// [Backends] is a collection of [Backend]s. /// /// It includes a service discovery method (static or dynamic) to discover all -/// the available backends as well as an optionally health check method to probe the liveness +/// the available backends as well as an optional health check method to probe the liveness /// of each backend. pub struct Backends { discovery: Box<dyn ServiceDiscovery + Send + Sync + 'static>, @@ -207,9 +207,9 @@ impl Backends { Ok(self.do_update(new_backends, enablement)) } - /// Run health check on all the backend if it is set. + /// Run health check on all backends if it is set. /// - /// When `parallel: true`, all the backends are checked in parallel instead of sequentially + /// When `parallel: true`, all backends are checked in parallel instead of sequentially pub async fn run_health_check(&self, parallel: bool) { use crate::health_check::HealthCheck; use log::{info, warn}; diff --git a/pingora-load-balancing/src/selection/mod.rs b/pingora-load-balancing/src/selection/mod.rs index d7b7e9b..88a6ea6 100644 --- a/pingora-load-balancing/src/selection/mod.rs +++ b/pingora-load-balancing/src/selection/mod.rs @@ -58,8 +58,12 @@ pub trait SelectionAlgorithm { fn next(&self, key: &[u8]) -> u64; } -/// [FVN](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function) hashing +/// [FNV](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function) hashing /// on weighted backends +pub type FNVHash = Weighted<fnv::FnvHasher>; + +/// Alias of [`FNVHash`] for backwards compatibility until the next breaking change +#[doc(hidden)] pub type FVNHash = Weighted<fnv::FnvHasher>; /// Random selection on weighted backends pub type Random = Weighted<algorithms::Random>; |