1 | import { ILogger } from '../../common';
|
2 | export interface ResolvedConnectionErrorHandlerOptions {
|
3 | readonly serverName: string;
|
4 | readonly logger: ILogger;
|
5 | |
6 |
|
7 |
|
8 | readonly maxErrors: number;
|
9 | |
10 |
|
11 |
|
12 | readonly maxRestarts: number;
|
13 | |
14 |
|
15 |
|
16 | readonly restartInterval: number;
|
17 | }
|
18 | export type ConnectionErrorHandlerOptions = Partial<ResolvedConnectionErrorHandlerOptions> & {
|
19 | readonly serverName: string;
|
20 | readonly logger: ILogger;
|
21 | };
|
22 | export declare class ConnectionErrorHandler {
|
23 | protected readonly options: ResolvedConnectionErrorHandlerOptions;
|
24 | constructor(options: ConnectionErrorHandlerOptions);
|
25 | shouldStop(error: Error, count?: number): boolean;
|
26 | protected readonly restarts: number[];
|
27 | shouldRestart(): boolean;
|
28 | }
|
29 | //# sourceMappingURL=connection-error-handler.d.ts.map |
\ | No newline at end of file |