/** * @interface ReliabilityConfig * @description Configuration for System Reliability. */ export interface ReliabilityConfig { enableCircuitBreaker: boolean; defaultRetries: number; defaultBackoffMs: number; } /** * @interface ReliabilityOperations * @description Defines operations for ensuring enterprise-grade reliability and resilience. */ export interface ReliabilityOperations { executeWithCircuitBreaker(operation: () => Promise, serviceName: string): Promise; executeWithRetry(operation: () => Promise, retries?: number, backoffMs?: number): Promise; triggerGracefulDegradation(componentName: string, reason: string): Promise; initiateFailover(serviceName: string, targetRegion: string): Promise; performBackup(dataScope: string): Promise; monitorSLA(serviceName: string, currentMetrics: any): Promise; } /** * @class SystemReliability * @description Implements features for ensuring system reliability and resilience, including circuit breakers, retries, and failover. */ export declare class SystemReliability implements ReliabilityOperations { private config; private logger; constructor(config: ReliabilityConfig); /** * Executes an operation with a circuit breaker pattern (conceptual). * @param {() => Promise} operation The function to execute. * @param {string} serviceName The name of the service this operation interacts with. * @returns {Promise} The result of the operation. */ executeWithCircuitBreaker(operation: () => Promise, serviceName: string): Promise; /** * Executes an operation with retry mechanisms and exponential backoff. * @param {() => Promise} operation The function to execute. * @param {number} [retries] Number of retry attempts. Defaults to config.defaultRetries. * @param {number} [backoffMs] Initial backoff delay in milliseconds. Defaults to config.defaultBackoffMs. * @returns {Promise} The result of the operation. */ executeWithRetry(operation: () => Promise, retries?: number, backoffMs?: number): Promise; /** * Triggers graceful degradation for a failing component or service (conceptual). * @param {string} componentName The name of the component to degrade. * @param {string} reason The reason for degradation. * @returns {Promise} */ triggerGracefulDegradation(componentName: string, reason: string): Promise; /** * Initiates an automatic failover to a redundant service or region (conceptual). * @param {string} serviceName The name of the service to failover. * @param {string} targetRegion The target region for failover. * @returns {Promise} */ initiateFailover(serviceName: string, targetRegion: string): Promise; /** * Performs a data backup operation (conceptual). * @param {string} dataScope The scope of data to backup (e.g., 'all', 'memory_db', 'configs'). * @returns {Promise} The ID or location of the backup. */ performBackup(dataScope: string): Promise; /** * Monitors Service Level Agreements (SLAs) and triggers alerts if violated (conceptual). * @param {string} serviceName The name of the service. * @param {any} currentMetrics Current performance metrics for the service. * @returns {Promise} True if SLA is met, false otherwise. */ monitorSLA(serviceName: string, currentMetrics: any): Promise; } //# sourceMappingURL=reliability.d.ts.map