Evan Huus f264dd2276 Add support for jitter in the retrier %!s(int64=11) %!d(string=hai) anos
..
README.md a5cb3f2b7d Implement the retriable resiliency pattern %!s(int64=11) %!d(string=hai) anos
backoffs.go a5cb3f2b7d Implement the retriable resiliency pattern %!s(int64=11) %!d(string=hai) anos
backoffs_test.go a5cb3f2b7d Implement the retriable resiliency pattern %!s(int64=11) %!d(string=hai) anos
classifier.go a5cb3f2b7d Implement the retriable resiliency pattern %!s(int64=11) %!d(string=hai) anos
classifier_test.go a5cb3f2b7d Implement the retriable resiliency pattern %!s(int64=11) %!d(string=hai) anos
retrier.go f264dd2276 Add support for jitter in the retrier %!s(int64=11) %!d(string=hai) anos
retrier_test.go f264dd2276 Add support for jitter in the retrier %!s(int64=11) %!d(string=hai) anos

README.md

retrier

Build Status GoDoc

The retriable resiliency pattern for golang.

Creating a retrier takes two parameters:

  • the times to back-off between retries (and implicitly the number of times to retry)
  • the classifier that determines which errors to retry
r := retrier.New(retrier.ConstantBackoff(3, 100*time.Millisecond), nil)

err := r.Run(func() error {
	// do some work
	return nil
})

if err != nil {
	// handle the case where the work failed three times
}