UNPKG

1.7 kBTypeScriptView Raw
1import { HttpOperationResponse } from "../httpOperationResponse";
2import { WebResourceLike } from "../webResource";
3import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy";
4export interface RetryData {
5 retryCount: number;
6 retryInterval: number;
7 error?: RetryError;
8}
9export interface RetryError extends Error {
10 message: string;
11 code?: string;
12 innerError?: RetryError;
13}
14export declare function systemErrorRetryPolicy(retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory;
15/**
16 * @class
17 * Instantiates a new "ExponentialRetryPolicyFilter" instance.
18 *
19 * @constructor
20 * @param {number} retryCount The client retry count.
21 * @param {number} retryInterval The client retry interval, in milliseconds.
22 * @param {number} minRetryInterval The minimum retry interval, in milliseconds.
23 * @param {number} maxRetryInterval The maximum retry interval, in milliseconds.
24 */
25export declare class SystemErrorRetryPolicy extends BaseRequestPolicy {
26 retryCount: number;
27 retryInterval: number;
28 minRetryInterval: number;
29 maxRetryInterval: number;
30 DEFAULT_CLIENT_RETRY_INTERVAL: number;
31 DEFAULT_CLIENT_RETRY_COUNT: number;
32 DEFAULT_CLIENT_MAX_RETRY_INTERVAL: number;
33 DEFAULT_CLIENT_MIN_RETRY_INTERVAL: number;
34 constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number);
35 sendRequest(request: WebResourceLike): Promise<HttpOperationResponse>;
36}
37//# sourceMappingURL=systemErrorRetryPolicy.d.ts.map
\No newline at end of file