forked from proxmox-mirrors/proxmox
doc fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
41862eeb95
commit
c609a58086
@ -44,7 +44,7 @@ impl <S> RateLimitedStream<S> {
|
|||||||
Self::with_limiter(stream, Some(read_limiter), Some(write_limiter))
|
Self::with_limiter(stream, Some(read_limiter), Some(write_limiter))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a new instance with specified [RateLimiters] for reads and writes.
|
/// Creates a new instance with specified [`RateLimiter`s](RateLimiter) for reads and writes.
|
||||||
pub fn with_limiter(
|
pub fn with_limiter(
|
||||||
stream: S,
|
stream: S,
|
||||||
read_limiter: Option<SharedRateLimit>,
|
read_limiter: Option<SharedRateLimit>,
|
||||||
|
@ -16,7 +16,7 @@ pub trait RateLimit {
|
|||||||
fn register_traffic(&mut self, current_time: Instant, data_len: u64) -> Duration;
|
fn register_traffic(&mut self, current_time: Instant, data_len: u64) -> Duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Like [RateLimit], but does not require self to be mutable.
|
/// Like [`RateLimit`], but does not require self to be mutable.
|
||||||
///
|
///
|
||||||
/// This is useful for types providing internal mutability (Mutex).
|
/// This is useful for types providing internal mutability (Mutex).
|
||||||
pub trait ShareableRateLimit: Send + Sync {
|
pub trait ShareableRateLimit: Send + Sync {
|
||||||
|
@ -22,10 +22,10 @@ pub async fn test_influxdb_udp(address: &str) -> Result<(), Error> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a [Metrics] handle that connects and sends data to the
|
/// Returns a [`Metrics`] handle that connects and sends data to the
|
||||||
/// given influxdb server at the given udp address/port
|
/// given influxdb server at the given udp address/port
|
||||||
///
|
///
|
||||||
/// `address` must be in the format of 'ip_or_hostname:port'
|
/// `address` must be in the format of `ip_or_hostname:port`
|
||||||
pub fn influxdb_udp(address: &str, mtu: Option<u16>) -> Metrics {
|
pub fn influxdb_udp(address: &str, mtu: Option<u16>) -> Metrics {
|
||||||
let (tx, rx) = mpsc::channel(1024);
|
let (tx, rx) = mpsc::channel(1024);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user