failover-sdk
Version:
One-line API failover with zero downtime. Native Rust performance with TypeScript interface.
26 lines • 852 B
TypeScript
import { RoutingConfig, FailoverConfig } from './types';
/**
* Auto-load configuration from available sources
*/
export declare function autoLoadConfig(): Promise<FailoverConfig | null>;
/**
* Set local configuration (overrides remote config)
*/
export declare function setLocalConfig(config: FailoverConfig): void;
/**
* Start background config refresh from SaaS API (when available)
*/
export declare function startConfigRefresh(projectId: string): Promise<void>;
/**
* Get current cached config (fast, synchronous)
*/
export declare function getCachedConfig(): RoutingConfig;
/**
* Stop config refresh (for testing/cleanup)
*/
export declare function stopConfigRefresh(): void;
/**
* Override cached config (for testing)
*/
export declare function setCachedConfig(config: RoutingConfig): void;
//# sourceMappingURL=config-loader.d.ts.map