from svc_infra.health import HealthRegistryRegistry of health checks for a service. The registry manages multiple health checks and provides methods to: - Run all checks and aggregate results - Wait for all critical checks to pass (startup probe) - Determine overall service health
>>> registry = HealthRegistry() >>> registry.add("database", check_database(db_url), critical=True) >>> registry.add("cache", check_redis(redis_url), critical=False) >>> >>> # Run all checks >>> result = await registry.check_all() >>> print(result.status) # "healthy" or "unhealthy" >>> >>> # Wait for startup >>> await registry.wait_until_healthy(timeout=60)