pub struct ReadyGate { /* private fields */ }Expand description
A thread-safe readiness gate.
Services use this to signal when they are ready to accept traffic.
Kubernetes liveness/readiness probes poll is_ready().
Implementations§
Source§impl ReadyGate
impl ReadyGate
Sourcepub fn set_not_ready(&self)
pub fn set_not_ready(&self)
Mark the service as NOT ready.
Sourcepub async fn wait_until_ready(&self)
pub async fn wait_until_ready(&self)
Wait until the service is ready, polling every interval.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ReadyGate
impl RefUnwindSafe for ReadyGate
impl Send for ReadyGate
impl Sync for ReadyGate
impl Unpin for ReadyGate
impl UnsafeUnpin for ReadyGate
impl UnwindSafe for ReadyGate
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