Skip to content

lytics/retry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

retry

GoDoc

Retry Library for Go

// Retry six times with a maximum backoff of 5 seconds
// between the retry attempts. The maximum backoff is
// reached within the third attempt, since retry uses
// exponential backoff.
var err error
retry.X(6, 5*time.Second, func() bool {
    err = DoSomething()
    return err != nil
})
if err != nil {
	// The error is not nil, so all retries failed.
} else {
	// The error is nil, so one succeeded.
}

About

Retry Library for Go

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages