forked from Shared/esg
Add health check and retry logic and circuit breaker
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { InquiryType } from '../enums/inquiry-type.enum';
|
||||
import { ProviderName } from '../enums/provider-name.enum';
|
||||
import { AttemptTrail } from '../helpers/provider-resilience.helper';
|
||||
import type { OutboundRequestTrace } from '../helpers/http-client.helper';
|
||||
|
||||
/**
|
||||
* Contract every external provider adapter must fulfill.
|
||||
@@ -22,6 +23,10 @@ export interface ProviderExecutionContext {
|
||||
trackingCode: string;
|
||||
/** Absolute timestamp when the inquiry wall-clock budget expires. */
|
||||
deadlineAt?: number;
|
||||
/** Signal for cancelling the currently active provider attempt. */
|
||||
signal?: AbortSignal;
|
||||
/** Mutable trail of HTTP attempts for client summary + logs. */
|
||||
attemptTrail?: AttemptTrail;
|
||||
/** Sanitized outbound HTTP calls made during this inquiry, including retries. */
|
||||
outboundRequests?: OutboundRequestTrace[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user