Struct PeakEwmaDiscover
pub struct PeakEwmaDiscover<D, C = CompleteOnResponse> { /* private fields */ }
Wraps a D-typed stream of discovered services with PeakEwma.
Implementations
impl<D, C> PeakEwmaDiscover<D, C>
fn new<Request>(discover: D, default_rtt: Duration, decay: Duration, completion: C) -> Self where D: Discover, D::Service: Service<Request>, C: TrackCompletion<Handle, <D::Service as Service<Request>>::Response>,Wraps a
D-typedDiscoverso that services have aPeakEwmaload metric.The provided
default_rttis used as the default RTT estimate for newly added services.They
decayvalue determines over what time period a RTT estimate should decay.
Trait Implementations
impl<'__pin, D, C> Unpin for PeakEwmaDiscover<D, C>
where
PinnedFieldsOf<__Origin<'__pin, D, C>>: Unpin,
impl<D, C> Stream for PeakEwmaDiscover<D, C>
where
D: Discover,
C: Clone,
type Item = Result<Change<<D as Discover>::Key, PeakEwma<<D as Discover>::Service, C>>, <D as Discover>::Error>;fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>
impl<D: Debug, C: Debug> Debug for PeakEwmaDiscover<D, C>
fn fmt(&self, f: &mut Formatter<'_>) -> Result