File

projects/resilient-http-client/src/lib/model/type/resilience.rx-operator.type.ts

Index

Properties
Methods

Methods

onFail
onFail(topic: string, uuid: string, message: string)
Parameters :
Name Type Optional
topic string No
uuid string No
message string No
Returns : void
onRequestDelayed
onRequestDelayed(topic: string, uuid: string)
Parameters :
Name Type Optional
topic string No
uuid string No
Returns : void
onRequestFinalize
onRequestFinalize(topic: string, uuid: string)
Parameters :
Name Type Optional
topic string No
uuid string No
Returns : void
onRequestRetry
onRequestRetry(topic: string, uuid: string, retryCount: number, nextRetry: number, failedOnHttpStatusCode: HttpStatusCode)
Parameters :
Name Type Optional
topic string No
uuid string No
retryCount number No
nextRetry number No
failedOnHttpStatusCode HttpStatusCode No
Returns : void
onRequestStart
onRequestStart(topic: string, uuid: string)
Parameters :
Name Type Optional
topic string No
uuid string No
Returns : void
onWaitingForUserDecision
onWaitingForUserDecision(topic: string, uuid: string, retryCount: number, failedOnStatusCode: HttpStatusCode, userRetryOrCancel: Subject)
Parameters :
Name Type Optional
topic string No
uuid string No
retryCount number No
failedOnStatusCode HttpStatusCode No
userRetryOrCancel Subject<boolean> No
Returns : void

Properties

disableRetry
disableRetry: boolean
Type : boolean
isDelayedAfterMs
isDelayedAfterMs: number
Type : number
logResult
logResult: boolean
Type : boolean
retryIntervalInMillisList
retryIntervalInMillisList: number[]
Type : number[]
retryOnStatusCodeList
retryOnStatusCodeList: number[]
Type : number[]
topic
topic: string
Type : string
topicToConfigDict
topicToConfigDict: literal type
Type : literal type
trace
trace: boolean
Type : boolean
waitForUserDecision
waitForUserDecision: boolean
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;
}

results matching ""

    No results matching ""