/**
 * Backend health checker for multi-source secret management.
 *
 * Probes PG and Vault backends for connectivity and reports health status.
 * Used on orchestrator startup and periodically to detect degraded backends.
 */
import type { BackendHealthStatus, AddBackendParams } from '@kici-dev/engine';
import type { Logger } from '@kici-dev/shared';
import type { BackendRegistry } from './backend-registry.js';
/** PG probe function type — injectable for testing. */
export type PgProbe = (connectionString?: string) => Promise<void>;
/**
 * Probes secret backends for connectivity and tracks health status.
 */
export declare class BackendHealthChecker {
    private readonly registry;
    private readonly logger;
    private intervalHandle;
    private readonly pgProbe;
    constructor(registry: BackendRegistry, logger: Logger, pgProbe?: PgProbe);
    /**
     * Check health of a single backend by name.
     * Updates the registry with the result.
     */
    checkHealth(name: string): Promise<BackendHealthStatus>;
    /**
     * Check health of all enabled backends in parallel.
     */
    checkAllBackends(): Promise<Map<string, BackendHealthStatus>>;
    /**
     * Start periodic health checks at the given interval.
     */
    startPeriodicCheck(intervalMs?: number): void;
    /**
     * Stop periodic health checks.
     */
    stopPeriodicCheck(): void;
    /**
     * Test connectivity to a backend without persisting it.
     * Creates an ephemeral connection and probes it.
     */
    testConnection(params: AddBackendParams): Promise<{
        ok: boolean;
        error?: string;
        latencyMs: number;
    }>;
    /**
     * Probe a backend by type and return its health status.
     */
    private probeBackend;
    /**
     * Probe a PG backend by running SELECT 1.
     */
    private probePg;
    /**
     * Probe a Vault backend by checking /v1/sys/health.
     */
    private probeVault;
}
//# sourceMappingURL=backend-health.d.ts.map