pub struct DrainHandle { /* private fields */ }Expand description
Closes every WebSocket and SSE stream an endpoint holds.
The plugin drains automatically when the app shuts down (sockets close
with 1001 Going Away, SSE streams end with complete), so clients
reconnect to a healthy instance. Take a handle with
GraphqlPlugin::drain_handle to drain earlier — for example when a
readiness probe flips during a rolling deploy. Draining is permanent for
the streams open at the time; new connections are still accepted.
Implementations§
Source§impl DrainHandle
impl DrainHandle
Trait Implementations§
Source§impl Clone for DrainHandle
impl Clone for DrainHandle
Auto Trait Implementations§
impl !RefUnwindSafe for DrainHandle
impl !UnwindSafe for DrainHandle
impl Forget for DrainHandle
impl Freeze for DrainHandle
impl Send for DrainHandle
impl Sync for DrainHandle
impl Unpin for DrainHandle
impl UnsafeUnpin for DrainHandle
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Scoped for T
impl<T> Scoped for T
Source§fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
Open a deferred
ScopeQuery for this type. Resolves the
registered scope at .load() time, not here.