Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
darylnwk committed Mar 12, 2020
1 parent 83bde1c commit 0ba4cfe
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,24 @@

## Usage

#### func ConstantBackoff

```go
func ConstantBackoff(_ uint, delay time.Duration) time.Duration
```
ConstantBackoff defines constant backoff strategy

#### func ExponentialBackoff

```go
func ExponentialBackoff(n uint, delay time.Duration) time.Duration
```
ExponentialBackoff defines exponential backoff strategy

#### func NoBackoff

```go
func NoBackoff() time.Duration
func NoBackoff(_ uint, _ time.Duration) time.Duration
```
NoBackoff defines no backoff strategy

Expand All @@ -35,7 +49,10 @@ type Retryer struct {

// Backoff defines a backoff function that returns `time.Duration`
// This is applied on subsequent attempts.
Backoff func() time.Duration
Backoff func(n uint, delay time.Duration) time.Duration

// Delay defines duration to delay
Delay time.Duration
}
```

Expand Down

0 comments on commit 0ba4cfe

Please sign in to comment.