/** * Health status of a component. */ export type HealthStatus = "healthy" | "degraded" | "unhealthy"; /** * Health check result for a single component. */ export interface ComponentHealth { /** Name of the component */ name: string; /** Health status */ status: HealthStatus; /** Optional message providing details */ message?: string; /** Optional metrics or details */ details?: Record; } /** * Overall system health report. */ export interface HealthReport { /** Overall health status (worst of all components) */ status: HealthStatus; /** Timestamp of the health check */ timestamp: Date; /** Node ID */ nodeId: string; /** Individual component health checks */ components: ComponentHealth[]; /** System uptime in milliseconds */ uptimeMs?: number; } /** * Interface for components that support health checks. */ export interface HealthCheckable { /** * Returns the health status of this component. */ getHealth(): ComponentHealth | Promise; } /** * Combines multiple health statuses, returning the worst one. * Priority: unhealthy > degraded > healthy */ export declare function combineHealthStatus(statuses: HealthStatus[]): HealthStatus; /** * Health check aggregator that collects health from multiple components. */ export declare class HealthAggregator { private readonly nodeId; private readonly startTime; private readonly components; constructor(nodeId: string); /** * Registers a component for health checking. */ register(name: string, component: HealthCheckable): void; /** * Unregisters a component. */ unregister(name: string): void; /** * Performs health checks on all registered components and returns a report. */ getHealth(): Promise; /** * Quick liveness check - just returns if the system is alive. * Use for Kubernetes liveness probes. */ isAlive(): boolean; /** * Quick readiness check - returns if the system is ready to serve requests. * Use for Kubernetes readiness probes. */ isReady(): Promise; } //# sourceMappingURL=health.d.ts.map