Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/async/mod.ts>RetryOptions

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
interface RetryOptions
import { type RetryOptions } from "https://deno.land/std@0.220.0/async/mod.ts";

Options for retry.

Properties

optional
multiplier: number = 2

How much to backoff after each retry.

optional
maxTimeout: number = 60000

The maximum milliseconds between attempts.

optional
maxAttempts: number = 5

The maximum amount of attempts until failure.

optional
minTimeout: number = 1000

The initial and minimum amount of milliseconds between attempts.

optional
jitter: number = 1

Amount of jitter to introduce to the time between attempts. This is 1 for full jitter by default.