Skip to content
Buy me a coffee

HedgingStrategy

Defined in: src/hedging.ts:68

Starts extra attempts when the current one is slow or fails; the first acceptable outcome wins and the rest are aborted. Unlike Polly v8 it does not wait for aborted attempts to finish.

T

new HedgingStrategy<T>(options, source): HedgingStrategy<T>

Defined in: src/hedging.ts:75

HedgingOptions<T>

StrategySource

HedgingStrategy<T>

execute(next, context): Promise<Outcome<T>>

Defined in: src/hedging.ts:84

Next<T>

ResilienceContext

Promise<Outcome<T>>

ResilienceStrategy.execute