Skip to content

Commit

Permalink
Fix a couple of typos/grammar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmunns authored and gideontong committed Jun 14, 2024
1 parent 19e4096 commit 370f6e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pingora-load-balancing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down Expand Up @@ -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};
Expand Down
6 changes: 5 additions & 1 deletion pingora-load-balancing/src/selection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down

0 comments on commit 370f6e3

Please sign in to comment.