aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.bleep2
-rw-r--r--pingora-load-balancing/src/lib.rs6
-rw-r--r--pingora-load-balancing/src/selection/mod.rs6
3 files changed, 9 insertions, 5 deletions
diff --git a/.bleep b/.bleep
index 9cc187c..e14ebdd 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 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>;