pub struct PeakEwmaDiscover<D, I = NoInstrument> { /* private fields */ }
Expand description
Wraps a D
-typed stream of discovery updates with PeakEwma
.
Implementations§
Source§impl<D, I> PeakEwmaDiscover<D, I>
impl<D, I> PeakEwmaDiscover<D, I>
Sourcepub fn new<Request>(
discover: D,
default_rtt: Duration,
decay: Duration,
instrument: I,
) -> Self
pub fn new<Request>( discover: D, default_rtt: Duration, decay: Duration, instrument: I, ) -> Self
Wraps a D
-typed Discover
so that services have a PeakEwma
load metric.
The provided default_rtt
is used as the default RTT estimate for newly
added services.
They decay
value determines over what time period a RTT estimate should
decay.
Trait Implementations§
Source§impl<D, I> Discover for PeakEwmaDiscover<D, I>
impl<D, I> Discover for PeakEwmaDiscover<D, I>
impl<'pin, D, I> Unpin for PeakEwmaDiscover<D, I>where
__PeakEwmaDiscover<'pin, D, I>: Unpin,
impl<D, I> UnsafeUnpin for PeakEwmaDiscover<D, I>
Auto Trait Implementations§
impl<D, I> Freeze for PeakEwmaDiscover<D, I>
impl<D, I> RefUnwindSafe for PeakEwmaDiscover<D, I>where
D: RefUnwindSafe,
I: RefUnwindSafe,
impl<D, I> Send for PeakEwmaDiscover<D, I>
impl<D, I> Sync for PeakEwmaDiscover<D, I>
impl<D, I> UnwindSafe for PeakEwmaDiscover<D, I>where
D: UnwindSafe,
I: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more