pub struct HealthAPIHandler { /* private fields */ }
Expand description
An API handler for reporting the health of all components.
This handler exposes two main routes – /health/ready
and /health/live
– which return the overall readiness and
liveness of all registered components, respectively. Each route will return a successful response (200 OK) if all
components are ready/live, or a failure response (503 Service Unavailable) if any (or all) of the components are not
ready/live, respectively.
In both cases, the response body will be a JSON object with all registered components, each with their individual readiness and liveness status, as well as the response latency (in seconds) for the component to respond to the latest liveness probe.
Trait Implementations§
Source§impl APIHandler for HealthAPIHandler
impl APIHandler for HealthAPIHandler
type State = HealthRegistryState
fn generate_initial_state(&self) -> Self::State
fn generate_routes(&self) -> Router<Self::State>
Auto Trait Implementations§
impl Freeze for HealthAPIHandler
impl RefUnwindSafe for HealthAPIHandler
impl Send for HealthAPIHandler
impl Sync for HealthAPIHandler
impl Unpin for HealthAPIHandler
impl UnwindSafe for HealthAPIHandler
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
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>
§impl<T> Track for T
impl<T> Track for T
§fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
Instruments this type by attaching the given allocation group token, returning a
Tracked
wrapper. Read more§fn in_current_allocation_group(self) -> Tracked<Self>
fn in_current_allocation_group(self) -> Tracked<Self>
Instruments this type by attaching the current allocation group, returning a
Tracked
wrapper. Read more