projects/resilient-http-client/src/lib/model/type/resilience.rx-operator.type.ts
Properties |
Methods |
| onFail |
onFail(topic: string, uuid: string, message: string)
|
|
Returns :
void
|
| onRequestDelayed |
onRequestDelayed(topic: string, uuid: string)
|
|
Returns :
void
|
| onRequestFinalize |
onRequestFinalize(topic: string, uuid: string)
|
|
Returns :
void
|
| onRequestRetry | ||||||||||||||||||
onRequestRetry(topic: string, uuid: string, retryCount: number, nextRetry: number, failedOnHttpStatusCode: HttpStatusCode)
|
||||||||||||||||||
|
Parameters :
Returns :
void
|
| onRequestStart |
onRequestStart(topic: string, uuid: string)
|
|
Returns :
void
|
| onWaitingForUserDecision | ||||||||||||||||||
onWaitingForUserDecision(topic: string, uuid: string, retryCount: number, failedOnStatusCode: HttpStatusCode, userRetryOrCancel: Subject
|
||||||||||||||||||
|
Parameters :
Returns :
void
|
| disableRetry |
disableRetry:
|
Type : boolean
|
| isDelayedAfterMs |
isDelayedAfterMs:
|
Type : number
|
| logResult |
logResult:
|
Type : boolean
|
| retryIntervalInMillisList |
retryIntervalInMillisList:
|
Type : number[]
|
| retryOnStatusCodeList |
retryOnStatusCodeList:
|
Type : number[]
|
| topic |
topic:
|
Type : string
|
| topicToConfigDict |
topicToConfigDict:
|
Type : literal type
|
| trace |
trace:
|
Type : boolean
|
| waitForUserDecision |
waitForUserDecision:
|
Type : boolean
|
import { HttpStatusCode } from '@angular/common/http';
import { Subject } from 'rxjs';
export interface ITopicConfig {
failMessage?: string;
failoverResponse?: unknown;
waitForUserDecision?: boolean;
disableRetry?: boolean;
logResult?: boolean;
trace?: boolean;
}
export type TTopicPropName = 'waitForUserDecision' | 'disableRetry' | 'logResult' | 'trace';
export interface IResilienceConfig {
topic: string;
disableRetry: boolean;
waitForUserDecision: boolean;
retryOnStatusCodeList: number[];
isDelayedAfterMs: number;
retryIntervalInMillisList: number[];
logResult: boolean;
trace: boolean;
topicToConfigDict: {
[topicId: string]: ITopicConfig;
};
onFail(topic: string, uuid: string, message: string): void;
onWaitingForUserDecision(
topic: string,
uuid: string,
retryCount: number,
failedOnStatusCode: HttpStatusCode,
userRetryOrCancel: Subject<boolean>,
): void;
onRequestDelayed(topic: string, uuid: string): void;
onRequestRetry(
topic: string,
uuid: string,
retryCount: number,
nextRetry: number,
failedOnHttpStatusCode: HttpStatusCode,
): void;
onRequestStart(topic: string, uuid: string): void;
onRequestFinalize(topic: string, uuid: string): void;
}