Simple retry library with exponential backoff and timeouts
go get github.com/chk-n/retry
// 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
})