pub struct H2DrainState {
pub draining: bool,
pub peer_last_stream_id: Option<u32>,
pub started_at: Option<Instant>,
pub graceful_shutdown_deadline: Option<Duration>,
}Expand description
Connection draining state for graceful shutdown.
Fields§
§draining: boolTrue when we’ve sent GOAWAY and are draining.
peer_last_stream_id: Option<u32>Last stream ID from peer’s GOAWAY (for retry decisions).
started_at: Option<Instant>Wall-clock timestamp captured the first time this connection entered
draining during soft-stop. Used together with
Self::graceful_shutdown_deadline to decide when to force-close.
Remains None until the proxy-initiated drain begins (peer-initiated
drains via handle_goaway_frame don’t arm the forced-close timer —
the caller in Mux::shutting_down is the only writer).
graceful_shutdown_deadline: Option<Duration>Wall-clock budget granted to in-flight streams after the initial
GOAWAY(NO_ERROR). None means “wait indefinitely” (knob value 0).
Default when unset upstream: 5 s (see L7ListenerHandler).
Auto Trait Implementations§
impl Freeze for H2DrainState
impl RefUnwindSafe for H2DrainState
impl Send for H2DrainState
impl Sync for H2DrainState
impl Unpin for H2DrainState
impl UnsafeUnpin for H2DrainState
impl UnwindSafe for H2DrainState
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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