pub struct HealthServerHandle { /* private fields */ }Expand description
Handle for a running health endpoint server.
W4 leg 2 (§4.2): the health accept worker BLOCKS in accept (kernel-parked,
zero idle wakes) rather than spinning a non-blocking poll with a backoff
sleep. Shutdown wakes the blocked accept with an explicit self-connect
interrupt to interrupt_target (the bound address, loopback-normalised),
mirroring the leg-1 listeners. Shutdown also interrupts an in-flight request
read directly via active_stream, so a silent client parked in
handle_connection’s read cannot defer shutdown by its admitted deadline.
Implementations§
Source§impl HealthServerHandle
impl HealthServerHandle
Sourcepub const fn local_addr(&self) -> SocketAddr
pub const fn local_addr(&self) -> SocketAddr
Returns the bound address for the health endpoint server.
Sourcepub fn shutdown(self) -> Result<(), ServerError>
pub fn shutdown(self) -> Result<(), ServerError>
Stops the health endpoint server and waits for its worker thread to exit.
§Errors
Returns ServerError::HealthEndpoint if the worker thread cannot be
joined cleanly or if the server loop recorded a serving error.