withStreamRetry
function withStreamRetry<T>(factory, opts?): AsyncGenerator<T>;Defined in: core/src/retry.ts:168
The streaming twin of withRetry. A retry happens only
while NOTHING has been yielded yet.
factory is re-invoked per attempt and gets a fresh signal, so an abandoned
attempt’s upstream request is cancelled rather than left racing the retry.
Once the first chunk is out, the stream is committed and any later failure
propagates untouched.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
factory |
(signal, attempt) => AsyncIterable<T> |
opts |
RetryOptions |
Returns
Section titled “Returns”AsyncGenerator<T>