From a432c2da9b71a2cf1e5169cabc1205cc272c4c9c Mon Sep 17 00:00:00 2001 From: James Munns Date: Mon, 3 Jun 2024 18:26:25 +0000 Subject: [PATCH] Fix a couple of typos/grammar issues --- .bleep | 2 +- pingora-load-balancing/src/lib.rs | 6 +++--- pingora-load-balancing/src/selection/mod.rs | 6 +++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.bleep b/.bleep index 9cc187c5..e14ebddf 100644 --- a/.bleep +++ b/.bleep @@ -1 +1 @@ -3cc5b114adb93b478fb57b8b12666c4c849d1ec8 +c54d1250ab2ee9777401b0f8296d30890344cb37 diff --git a/pingora-load-balancing/src/lib.rs b/pingora-load-balancing/src/lib.rs index 60e30ed4..c950c85c 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, @@ -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 d7b7e9bc..88a6ea63 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; + +/// Alias of [`FNVHash`] for backwards compatibility until the next breaking change +#[doc(hidden)] pub type FVNHash = Weighted; /// Random selection on weighted backends pub type Random = Weighted;