Skip to content
/ retry Public

Simple retry library with exponential backoff and timeouts

License

Notifications You must be signed in to change notification settings

chk-n/retry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Retry

Simple retry library with exponential backoff and timeouts

Get

go get github.com/chk-n/retry

Example

// initialise retry
r := retry.NewDefault()

err := r.Do(func() error {
 // Call error prone function
})

err = r.DoTimeout(time.Second, func() error {
 // Do network call with timeout
})