pub struct DrainResponse {
pub initiated: bool,
pub wait_admin_honored: bool,
}Expand description
Response body for admin_v1_drain (issue #244). initiated: true
reports that the trigger fired; wait_admin_honored reports
whether the server actually plans to keep admin alive through
router.shutdown (issue #604). The trigger is first-writer-wins, so
a wait_admin: true request that loses the race to an earlier drain
without it gets false here. The decdn node drain --wait client
then refuses to enter the polling loop instead of treating the
imminent ECONNREFUSED as drain completion. A true ack covers
admin-RPC races only: a SIGINT/SIGTERM that wins the runtime’s
shutdown select still closes admin early.
Fields§
§initiated: booltrue once the trigger has been fired and the runtime’s
shutdown sequence is underway. “Initiated”, not “completed”:
when wait_admin_honored is false, the admin server may
close before the response itself is delivered (the SIGTERM
ordering).
wait_admin_honored: booltrue when the server received wait_admin: true and is
keeping admin alive through router.shutdown on this drain.
The --wait client treats false as “server cannot observe
completion safely” and refuses to poll.
Trait Implementations§
Source§impl Clone for DrainResponse
impl Clone for DrainResponse
Source§impl Debug for DrainResponse
impl Debug for DrainResponse
Source§impl Default for DrainResponse
impl Default for DrainResponse
Source§impl<'de> Deserialize<'de> for DrainResponse
impl<'de> Deserialize<'de> for DrainResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for DrainResponse
impl RefUnwindSafe for DrainResponse
impl Send for DrainResponse
impl Sync for DrainResponse
impl Unpin for DrainResponse
impl UnsafeUnpin for DrainResponse
impl UnwindSafe for DrainResponse
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
impl<'de, T> BorrowedRpcObject<'de> for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 more