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 fn install_grant_stream(
&self,
state: Arc<StreamState>,
) -> Result<(), ServerError>
pub fn install_grant_stream( &self, state: Arc<StreamState>, ) -> Result<(), ServerError>
Shares the owner’s live cursor; a second owner is refused before serving.
§Errors
Names an attempted replacement of the process’s installed grant reader.
Sourcepub fn install_listen_addresses(
&self,
addresses: Vec<SocketAddr>,
) -> Result<(), ServerError>
pub fn install_listen_addresses( &self, addresses: Vec<SocketAddr>, ) -> Result<(), ServerError>
Publishes all bound wire addresses after the listeners are opened.
§Errors
Refuses a second publication by name.
Sourcepub fn link_bridges(&self) -> BridgeRegistry
pub fn link_bridges(&self) -> BridgeRegistry
The live per-link counters shared with exporting bridge workers.
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 install_spine(&self, spine: &Arc<EventStore>)
pub fn install_spine(&self, spine: &Arc<EventStore>)
Publishes a participant’s unloadable-conversation record onto
GET /unloadable-conversations.
Server startup binds the health endpoint FIRST — liveness has to be
answerable while the rest of the server is still being built — so the
record cannot be a constructor argument. Until this is called the route
answers participant_installed: false, which is a different answer from
“nothing is refused” and is reported as such.
Installing shares the handler’s live record rather than copying it: a
refusal recorded after this call is reported by the next scrape. No
thread, timer, or notification is created here.
Publishes the spine store onto /reclaim and the quiesce route (DUR-021 R4).
pub fn install_unloadable_record(&self, record: UnloadableConversationRecord)
Sourcepub fn install_credential_reissuer(
&self,
reissuer: Arc<dyn OperatorCredentialReissuer>,
)
pub fn install_credential_reissuer( &self, reissuer: Arc<dyn OperatorCredentialReissuer>, )
Publishes the participant authority onto
POST /operator/credential-reissue (R18 amendment A7, §0.18).
Same timing constraint as Self::install_unloadable_record: the
health endpoint binds before the participant exists, so the authority
arrives here once built. Until it does the route answers 503 and says
no participant is installed, which is a different answer from an
unknown identity and is reported as such. No thread, timer, or
notification is created here.
Sourcepub fn install_ephemeral_sweep_report(
&self,
report: EphemeralSweepCounts,
) -> Result<(), ServerError>
pub fn install_ephemeral_sweep_report( &self, report: EphemeralSweepCounts, ) -> Result<(), ServerError>
Installs the immutable startup sweep answer.
§Errors
Returns an endpoint error if startup attempts a second installation.
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.