pub struct ReadyController;Expand description
Readiness probe endpoint: GET /readyz.
Returns 200 OK when crate::metrics::SERVER_READY is true
(set after crate::server::Server::setup completes and cleared on shutdown).
Returns 503 Service Unavailable during startup or graceful drain.
Register this in your Kubernetes readinessProbe.
Implementations§
Source§impl ReadyController
impl ReadyController
pub fn is_matching_request(request: &Request) -> bool
pub fn process_request(_request: &Request, response: Response) -> Response
Trait Implementations§
Source§impl Controller for ReadyController
impl Controller for ReadyController
Source§fn is_matching(request: &Request, _connection: &ConnectionInfo) -> bool
fn is_matching(request: &Request, _connection: &ConnectionInfo) -> bool
Returns
true if this controller should handle the given request.
Called in declaration order; the first match wins.Auto Trait Implementations§
impl Freeze for ReadyController
impl RefUnwindSafe for ReadyController
impl Send for ReadyController
impl Sync for ReadyController
impl Unpin for ReadyController
impl UnsafeUnpin for ReadyController
impl UnwindSafe for ReadyController
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