MCPcopy Create free account
hub / github.com/hashintel/hash / healthcheck

Function healthcheck

apps/hash-graph/src/subcommand/admin_server.rs:396–410  ·  view source on GitHub ↗
(address: AdminAddress)

Source from the content-addressed store, hash-verified

394}
395
396pub async fn healthcheck(address: AdminAddress) -> Result<(), Report<HealthcheckError>> {
397 let request_url = format!("http://{address}/health");
398
399 timeout(
400 Duration::from_secs(10),
401 Client::new().head(&request_url).send(),
402 )
403 .await
404 .change_context(HealthcheckError::Timeout)?
405 .change_context(HealthcheckError::NotHealthy)?
406 .error_for_status()
407 .change_context(HealthcheckError::NotHealthy)?;
408
409 Ok(())
410}

Callers 1

admin_serverFunction · 0.70

Calls 3

OkInterface · 0.85
sendMethod · 0.65
change_contextMethod · 0.45

Tested by

no test coverage detected