/**
 * Health Check Service
 * Singleton service that periodically checks API key health for providers
 * with health check enabled. Updates key health status and filters unhealthy
 * keys from rotation endpoints.
 */
/**
 * Health Check Service - Singleton
 * Manages periodic health checks for API keys across all providers
 */
export declare class HealthCheckService {
    private static instance;
    /** Timer handles for each provider's health check interval */
    private timers;
    /** Track consecutive failures and cooldown per key (providerId:keyId -> state) */
    private keyStates;
    /** Base directory for config operations */
    private baseDir;
    /** Lock to prevent concurrent checks on same provider */
    private checkingProviders;
    private constructor();
    /**
     * Get singleton instance
     */
    static getInstance(): HealthCheckService;
    /**
     * Start health check for a specific provider
     * @param providerId - The provider ID to start health checks for
     */
    startHealthCheck(providerId: string): void;
    /**
     * Stop health check for a specific provider
     * @param providerId - The provider ID to stop health checks for
     */
    stopHealthCheck(providerId: string): void;
    /**
     * Start health checks for all providers that have health check enabled
     * @param baseDir - Base directory for config operations
     */
    startAllHealthChecks(baseDir: string): void;
    /**
     * Stop all active health checks
     */
    stopAllHealthChecks(): void;
    /**
     * Manually trigger a health check for a provider
     * @param providerId - The provider ID to check
     */
    checkProviderNow(providerId: string): Promise<void>;
    /**
     * Check a single API key's health
     */
    private checkSingleKey;
    /**
     * Update the health status of a key in the provider's apiKeys array
     */
    private updateKeyHealth;
    /**
     * Get the current health status of all keys for a provider
     */
    getProviderHealthStatus(providerId: string): Array<{
        keyId: string;
        status: 'healthy' | 'unhealthy' | 'unknown';
        lastCheck?: string;
        lastError?: string;
        consecutiveFailures: number;
        inCooldown: boolean;
    }>;
    /**
     * Check if the service is running health checks for any provider
     */
    isRunning(): boolean;
    /**
     * Get list of provider IDs currently being monitored
     */
    getMonitoredProviders(): string[];
}
/**
 * Get the singleton health check service instance
 */
export declare function getHealthCheckService(): HealthCheckService;
//# sourceMappingURL=health-check-service.d.ts.map