chronik-cache
Version:
A cache helper for chronik-client
25 lines (24 loc) • 788 B
TypeScript
interface FailoverOptions {
maxRetries?: number;
retryDelay?: number;
exponentialBackoff?: boolean;
enableLogging?: boolean;
}
export default class FailoverHandler {
private maxRetries;
private retryDelay;
private exponentialBackoff;
private enableLogging;
private logger;
constructor(options?: FailoverOptions);
executeWithRetry<T>(operation: () => Promise<T>, context?: string): Promise<T>;
/**
* Special handling for WebSocket related operations
*/
handleWebSocketOperation<T>(operation: () => Promise<T>, address: string, context?: string): Promise<T>;
/**
* Special handling for database operations
*/
handleDbOperation<T>(operation: () => Promise<T>, context?: string): Promise<T | null>;
}
export {};