Skip to content

Commit

Permalink
release of #27 & #28
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Seidl committed Feb 25, 2020
1 parent 01ec765 commit a8f6dc7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ now implement via functions produces Options (aka `retry.OnRetry`)

## Usage

```go
var (
DefaultAttempts = uint(10)
DefaultDelay = 100 * time.Millisecond
DefaultMaxJitter = 100 * time.Millisecond
DefaultOnRetry = func(n uint, err error) {}
DefaultRetryIf = IsRecoverable
DefaultDelayType = CombineDelay(BackOffDelay, RandomDelay)
DefaultLastErrorOnly = false
)
```

#### func BackOffDelay

```go
Expand Down Expand Up @@ -217,6 +229,13 @@ func LastErrorOnly(lastErrorOnly bool) Option
return the direct last error that came from the retried function default is
false (return wrapped errors with everything)

#### func MaxDelay

```go
func MaxDelay(maxDelay time.Duration) Option
```
MaxDelay set maximum delay between retry does not apply by default

#### func MaxJitter

```go
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.3
2.6.0

0 comments on commit a8f6dc7

Please sign in to comment.