/** * Health Check Module * * Provides health check functions and optional HTTP server for: * - /health - Full health status JSON * - /ready - Kubernetes readiness probe (200/503) * - /live - Kubernetes liveness probe (200/503) * - /metrics - Prometheus metrics * * Enable HTTP server by setting HEALTH_PORT environment variable. */ export interface HealthStatus { status: "healthy" | "degraded" | "unhealthy"; uptime: number; version: string; timestamp: string; checks: { circuitBreaker: { state: "closed" | "open" | "half-open"; consecutiveFailures: number; }; cache: { size: number; methods: Record; }; rateLimiter: { requestsInWindow: number; limited: boolean; perChatTracked: number; }; }; } /** * Get full health status */ export declare function getHealthStatus(): HealthStatus; /** * Check if service is ready to accept traffic (K8s readiness) * Returns false if circuit breaker is open */ export declare function isReady(): boolean; /** * Check if service is alive (K8s liveness) * Always returns true unless process is corrupted */ export declare function isLive(): boolean; /** * Start health check HTTP server * @param port - Port to listen on (default from HEALTH_PORT env) */ export declare function startHealthServer(port?: number): void; /** * Stop health check HTTP server */ export declare function stopHealthServer(): Promise; /** * Check if health server is running */ export declare function isHealthServerRunning(): boolean; //# sourceMappingURL=index.d.ts.map