## Documentation ¶

### Overview ¶

Package backoff contains backoff algorithm helper functions.

### Index ¶

### Constants ¶

This section is empty.

### Variables ¶

This section is empty.

### Functions ¶

This section is empty.

### Types ¶

#### type Algorithm ¶

Algorithm defines a function that calculates a time.Duration based on the given retry attempt number.

#### func BinaryExponential ¶

BinaryExponential creates a Algorithm that multiplies the factor duration by an exponentially increasing factor for each attempt, where the factor is calculated as `2` raised to the attempt number (2^attempt).

#### func Exponential ¶

Exponential creates a Algorithm that multiplies the factor duration by an exponentially increasing factor for each attempt, where the factor is calculated as the given base raised to the attempt number.

#### func Fibonacci ¶

Fibonacci creates a Algorithm that multiplies the factor duration by an increasing factor for each attempt, where the factor is the Nth number in the Fibonacci sequence.

#### func Incremental ¶

Incremental creates a Algorithm that increments the initial duration by the given increment for each attempt.