#[non_exhaustive]pub enum FailoverPhase {
Disconnected = 0,
Retrying = 1,
Reset = 2,
GaveUp = 3,
}Expand description
Phase discriminant on FailoverProgressEvent.
The same callback fires for every phase of a mid-query failover — from the moment the cursor’s connection dies through to either a successful reconnect or an exhausted retry budget. Operators can route on the phase to feed SLO dashboards (“disconnected for N seconds” alerts), per-attempt retry telemetry, or a one-shot “gave up” notifier.
Marked #[non_exhaustive] so we can add phases (e.g. a hypothetical
Cancelled for cancel-during-failover races) without breaking
downstream matches.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Disconnected = 0
The cursor’s connection just died. Fires once, before the retry loop runs.
Retrying = 1
A reconnect dial is about to be attempted. Fires once per outer-loop iteration of the retry walk, after the inter- attempt backoff sleep has elapsed.
Reset = 2
A reconnect succeeded; replayed batches will start arriving on
the new connection. Fires immediately before the
ReaderQuery::on_failover_reset callback (when both are
installed) so a single sink sees the entire lifecycle.
GaveUp = 3
The retry budget is exhausted. The cursor is terminal; the
error returned to the caller is in
FailoverProgressEvent::final_error.
Trait Implementations§
Source§impl Clone for FailoverPhase
impl Clone for FailoverPhase
Source§fn clone(&self) -> FailoverPhase
fn clone(&self) -> FailoverPhase
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 FailoverPhase
Source§impl Debug for FailoverPhase
impl Debug for FailoverPhase
impl Eq for FailoverPhase
Source§impl Hash for FailoverPhase
impl Hash for FailoverPhase
Source§impl PartialEq for FailoverPhase
impl PartialEq for FailoverPhase
impl StructuralPartialEq for FailoverPhase
Auto Trait Implementations§
impl Freeze for FailoverPhase
impl RefUnwindSafe for FailoverPhase
impl Send for FailoverPhase
impl Sync for FailoverPhase
impl Unpin for FailoverPhase
impl UnsafeUnpin for FailoverPhase
impl UnwindSafe for FailoverPhase
Blanket Implementations§
impl<T> Allocation for T
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
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<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> 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