pub struct ShutdownReport {
pub queues_force_destroyed: usize,
pub executor_cleanup_completed: bool,
}Expand description
What a shutdown actually managed to do.
Returned by RequestHandler::shutdown and
RequestHandler::shutdown_with_timeout because both can fail to be
graceful and neither used to say so: the executor’s cleanup hook was awaited
with its result discarded, so a hook that hung past the timeout was
indistinguishable from one that finished immediately. A process could report
“drained, exiting” having drained nothing.
Fields§
§queues_force_destroyed: usizeEvent queues still active when the drain deadline passed, and therefore destroyed with work possibly still in flight.
Always 0 for RequestHandler::shutdown, which does not wait.
executor_cleanup_completed: boolWhether the executor’s on_shutdown hook returned within the timeout.
false means the hook was abandoned, not that it failed — it may still
be running. Whatever it was releasing (flushing a buffer, closing a
connection, committing a checkpoint) may not have been released.
Implementations§
Source§impl ShutdownReport
impl ShutdownReport
Sourcepub const fn is_graceful(self) -> bool
pub const fn is_graceful(self) -> bool
Whether everything the handler waited for actually finished.
Trait Implementations§
Source§impl Clone for ShutdownReport
impl Clone for ShutdownReport
Source§fn clone(&self) -> ShutdownReport
fn clone(&self) -> ShutdownReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ShutdownReport
Source§impl Debug for ShutdownReport
impl Debug for ShutdownReport
impl Eq for ShutdownReport
Source§impl PartialEq for ShutdownReport
impl PartialEq for ShutdownReport
impl StructuralPartialEq for ShutdownReport
Auto Trait Implementations§
impl Freeze for ShutdownReport
impl RefUnwindSafe for ShutdownReport
impl Send for ShutdownReport
impl Sync for ShutdownReport
impl Unpin for ShutdownReport
impl UnsafeUnpin for ShutdownReport
impl UnwindSafe for ShutdownReport
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request