mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-21 18:40:39 +08:00
node: Fix naming/spelling of "limitter" module
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
pub mod filter;
|
||||
pub mod gossip;
|
||||
pub mod io;
|
||||
pub mod limitter;
|
||||
pub mod limiter;
|
||||
pub mod message;
|
||||
pub mod session;
|
||||
|
||||
@@ -63,7 +63,7 @@ pub use crate::service::session::Session;
|
||||
pub use radicle::node::policy::config as policy;
|
||||
|
||||
use self::io::Outbox;
|
||||
use self::limitter::RateLimiter;
|
||||
use self::limiter::RateLimiter;
|
||||
use self::message::InventoryAnnouncement;
|
||||
use self::policy::NamespacesError;
|
||||
|
||||
@@ -383,7 +383,7 @@ pub struct Service<D, S, G> {
|
||||
fetching: HashMap<RepoId, FetchState>,
|
||||
/// Fetch queue.
|
||||
queue: VecDeque<QueuedFetch>,
|
||||
/// Request/connection rate limitter.
|
||||
/// Request/connection rate limiter.
|
||||
limiter: RateLimiter,
|
||||
/// Current seeded repositories bloom filter.
|
||||
filter: Filter,
|
||||
@@ -1159,7 +1159,7 @@ where
|
||||
.limiter
|
||||
.limit(host.clone(), &self.config.limits.rate.inbound, self.clock)
|
||||
{
|
||||
trace!(target: "service", "Rate limitting inbound connection from {host}..");
|
||||
trace!(target: "service", "Rate limiting inbound connection from {host}..");
|
||||
return false;
|
||||
}
|
||||
true
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::collections::HashMap;
|
||||
use localtime::LocalTime;
|
||||
use radicle::node::{address, config, HostName};
|
||||
|
||||
/// Peer rate limitter.
|
||||
/// Peer rate limiter.
|
||||
///
|
||||
/// Uses a token bucket algorithm, where each address starts with a certain amount of tokens,
|
||||
/// and every request from that address consumes one token. Tokens refill at a predefined
|
||||
Reference in New Issue
Block a user