pub struct ProbeState { /* private fields */ }Expand description
Shared probe lifecycle state stored in AppState.
Implementations§
Source§impl ProbeState
impl ProbeState
Sourcepub fn pending_startup() -> Self
pub fn pending_startup() -> Self
Create a probe state that starts in pending-startup mode.
Sourcepub fn ready_for_test() -> Self
pub fn ready_for_test() -> Self
Create a probe state that is immediately ready.
Sourcepub fn mark_startup_complete(&self)
pub fn mark_startup_complete(&self)
Mark startup as complete and readiness eligible.
Sourcepub fn set_startup_complete(&self, complete: bool)
pub fn set_startup_complete(&self, complete: bool)
Override startup completion for tests.
Sourcepub fn begin_shutdown(&self)
pub fn begin_shutdown(&self)
Mark the application as shutting down so readiness flips false.
Sourcepub fn begin_draining(&self)
pub fn begin_draining(&self)
Alias for readiness drain used during graceful shutdown.
Sourcepub fn set_draining(&self, draining: bool)
pub fn set_draining(&self, draining: bool)
Override shutdown-draining state for tests.
Sourcepub fn configure_replica_dependency(&self, fallback: ReplicaFallback)
pub fn configure_replica_dependency(&self, fallback: ReplicaFallback)
Configure runtime readiness behavior for a read replica.
§Panics
Panics if the replica dependency lock is poisoned.
Sourcepub fn mark_replica_connection_ready(&self)
pub fn mark_replica_connection_ready(&self)
Mark the configured read replica as reachable.
§Panics
Panics if the replica dependency lock is poisoned.
Sourcepub fn mark_replica_connection_unready(&self, detail: impl Into<String>)
pub fn mark_replica_connection_unready(&self, detail: impl Into<String>)
Mark the configured read replica as unreachable.
§Panics
Panics if the replica dependency lock is poisoned.
Sourcepub fn mark_replica_migrations_ready(&self)
pub fn mark_replica_migrations_ready(&self)
Mark the configured read replica’s migration state as current.
§Panics
Panics if the replica dependency lock is poisoned.
Sourcepub fn mark_replica_ready(&self)
pub fn mark_replica_ready(&self)
Mark the configured read replica as ready.
§Panics
Panics if the replica dependency lock is poisoned.
Sourcepub fn mark_replica_unready(&self, detail: impl Into<String>)
pub fn mark_replica_unready(&self, detail: impl Into<String>)
Mark the configured read replica as unavailable or stale.
§Panics
Panics if the replica dependency lock is poisoned.
Sourcepub fn is_startup_complete(&self) -> bool
pub fn is_startup_complete(&self) -> bool
Returns whether startup completed successfully.
Sourcepub fn is_shutting_down(&self) -> bool
pub fn is_shutting_down(&self) -> bool
Returns whether graceful shutdown has started.
Trait Implementations§
Source§impl Clone for ProbeState
impl Clone for ProbeState
Source§fn clone(&self) -> ProbeState
fn clone(&self) -> ProbeState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProbeState
impl Debug for ProbeState
Source§impl Default for ProbeState
impl Default for ProbeState
Source§fn default() -> ProbeState
fn default() -> ProbeState
Auto Trait Implementations§
impl Freeze for ProbeState
impl RefUnwindSafe for ProbeState
impl Send for ProbeState
impl Sync for ProbeState
impl Unpin for ProbeState
impl UnsafeUnpin for ProbeState
impl UnwindSafe for ProbeState
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> RepositoryHooksClone for Twhere
T: Clone,
impl<T> RepositoryHooksClone for Twhere
T: Clone,
Source§fn autumn_clone(&self) -> T
fn autumn_clone(&self) -> T
Source§impl<T> RepositoryHooksDefault for Twhere
T: Default,
impl<T> RepositoryHooksDefault for Twhere
T: Default,
Source§fn autumn_default() -> T
fn autumn_default() -> T
Source§impl<T, Conn> RunQueryDsl<Conn> for T
impl<T, Conn> RunQueryDsl<Conn> for T
Source§fn execute<'conn, 'query>(
self,
conn: &'conn mut Conn,
) -> <Conn as AsyncConnectionCore>::ExecuteFuture<'conn, 'query>
fn execute<'conn, 'query>( self, conn: &'conn mut Conn, ) -> <Conn as AsyncConnectionCore>::ExecuteFuture<'conn, 'query>
Source§fn load<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>>
fn load<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>>
Source§fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnectionCore,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnectionCore,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
Stream] with the returned rows. Read moreSource§fn get_result<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, LoadNext<Pin<Box<Self::Stream<'conn>>>>>
fn get_result<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, LoadNext<Pin<Box<Self::Stream<'conn>>>>>
Source§fn get_results<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>>
fn get_results<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>>
Vec with the affected rows. Read moreSource§impl<T> Scoped for T
impl<T> Scoped for T
Source§fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
ScopeQuery for this type. Resolves the
registered scope at .load() time, not here.