adpa-enterprise-framework-automation
Version:
Modular, standards-compliant Node.js/TypeScript automation framework for enterprise requirements, project, and data management. Provides CLI and API for BABOK v3, PMBOK 7th Edition, and DMBOK 2.0 (in progress). Production-ready Express.js API with TypeSpe
31 lines • 1.05 kB
TypeScript
/**
* Enhanced Retry Manager with intelligent backoff and circuit breaker
*/
import { RetryConfig } from "./types.js";
interface CircuitBreakerState {
failures: number;
lastFailureTime: number;
state: 'closed' | 'open' | 'half-open';
}
export declare class RetryManager {
private static instance;
private circuitBreakers;
private readonly DEFAULT_CIRCUIT_BREAKER_CONFIG;
private readonly DEFAULT_RETRY_CONFIG;
private constructor();
static getInstance(): RetryManager;
executeWithRetry<T>(operation: () => Promise<T>, operationName: string, provider: string, retryConfig?: RetryConfig): Promise<T>;
private canExecute;
private onSuccess;
private onFailure;
private calculateDelay;
private isRetryableError;
private isRateLimitError;
private extractRetryAfter;
private enhanceError;
private sleep;
getCircuitBreakerStatus(): Record<string, CircuitBreakerState>;
resetCircuitBreaker(provider?: string): void;
}
export {};
//# sourceMappingURL=RetryManager.d.ts.map