MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / polled_health_router

Function polled_health_router

crates/openshell-server/src/http.rs:441–445  ·  view source on GitHub ↗

Build a [`health_router`] that has already observed its first probe outcome. Test-only — production code must not block the listener on the first poll (see [`health_router`]).

(store: Arc<Store>)

Source from the content-addressed store, hash-verified

439 /// outcome. Test-only — production code must not block the listener on
440 /// the first poll (see [`health_router`]).
441 async fn polled_health_router(store: Arc<Store>) -> Router {
442 let mut monitor = DatabaseHealthMonitor::spawn(store);
443 monitor.wait_until_polled().await;
444 health_router_from_receiver(monitor.subscribe())
445 }
446
447 async fn get(router: Router, path: &str) -> (StatusCode, serde_json::Value) {
448 let response = router

Calls 4

wait_until_polledMethod · 0.80
spawnFunction · 0.50
subscribeMethod · 0.45

Tested by

no test coverage detected