UNPKG

@tehreet/conduit

Version:

LLM API gateway with intelligent routing, robust process management, and health monitoring

62 lines 1.47 kB
import { EventEmitter } from 'events'; import { HealthStatus, HealthCheckResult } from '../types'; export type HealthCheckFunction = () => Promise<HealthCheckResult>; /** * Health monitoring system for Conduit */ export declare class HealthMonitor extends EventEmitter { private checks; private status; private interval; private isRunning; constructor(); /** * Start health monitoring */ start(intervalMs?: number): void; /** * Stop health monitoring */ stop(): void; /** * Register a health check */ registerCheck(name: string, check: HealthCheckFunction): void; /** * Unregister a health check */ unregisterCheck(name: string): boolean; /** * Run all health checks */ runHealthChecks(): Promise<void>; /** * Get current health status */ getStatus(): HealthStatus; /** * Check if system is healthy */ isHealthy(): boolean; /** * Get specific check result */ getCheckResult(name: string): HealthCheckResult | undefined; /** * Get all registered check names */ getCheckNames(): string[]; /** * Register default health checks */ private registerDefaultChecks; /** * Create a timeout promise */ private timeoutPromise; /** * Format uptime in human readable format */ private formatUptime; } //# sourceMappingURL=HealthMonitor.d.ts.map