LinearBackoff

class LinearBackoff(val delay: Duration = 1.seconds) : BackoffStrategy

A backoff strategy that waits a constant, linear amount of time between each retry attempt. The delay is the same for every attempt, regardless of the attempt number.

Constructors

Link copied to clipboard
constructor(delay: Duration = 1.seconds)

Properties

Link copied to clipboard

The fixed duration to wait before the next retry attempt. Defaults to 1 second.

Functions

Link copied to clipboard
open suspend override fun delay(attempt: Int)

Suspends for the delay duration appropriate for the given attempt (1-based).