pub struct AdaptiveEndpoint<S> { /* private fields */ }Expand description
A Tower service with per-endpoint adaptive pacing and bounded admission.
poll_ready reports whether another request can enter the endpoint’s
bounded scheduling horizon. call reserves a virtual GCRA slot; the
returned future waits until that slot is due, waits for the inner service to
be ready, and only then records the actual dispatch. Queue delay therefore
never contaminates the RTT sample.
Implementations§
Source§impl<S> AdaptiveEndpoint<S>
impl<S> AdaptiveEndpoint<S>
pub fn new(inner: S, config: EndpointConfig) -> Self
pub fn new_at(inner: S, config: EndpointConfig, now: Instant) -> Self
pub fn controller(&self) -> &Mutex<EndpointController>
pub fn snapshot(&self) -> ControllerSnapshot
pub fn load_metric(&self) -> LoadMetric
Trait Implementations§
Source§impl<S> Clone for AdaptiveEndpoint<S>
impl<S> Clone for AdaptiveEndpoint<S>
Source§impl<S> Drop for AdaptiveEndpoint<S>
impl<S> Drop for AdaptiveEndpoint<S>
Source§impl<S> Load for AdaptiveEndpoint<S>
impl<S> Load for AdaptiveEndpoint<S>
Source§impl<S, Request> Service<Request> for AdaptiveEndpoint<S>
impl<S, Request> Service<Request> for AdaptiveEndpoint<S>
Auto Trait Implementations§
impl<S> !RefUnwindSafe for AdaptiveEndpoint<S>
impl<S> !UnwindSafe for AdaptiveEndpoint<S>
impl<S> Freeze for AdaptiveEndpoint<S>
impl<S> Send for AdaptiveEndpoint<S>
impl<S> Sync for AdaptiveEndpoint<S>
impl<S> Unpin for AdaptiveEndpoint<S>
impl<S> UnsafeUnpin for AdaptiveEndpoint<S>where
Arc<Shared<S>>: UnsafeUnpin,
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