Skip to content
#

retry

Here are 264 public repositories matching this topic...

resilience4j
elonzh
elonzh commented Jul 17, 2017
u := "http://httpbin.org/post"
// Using net/http
v := make(url.Values) // url.Values has methods for value manipulating
v.Set("k1", "v1")
http.PostForm(u, v)
// or
http.PostForm(u, url.Values{"k1": []string{"v1"}})
// Using gentleman
r := gentleman.NewRequest()
// multipart.DataFields is actually same as url.Values, but without methods
d := make(multipart.DataFields)
d["k1"] = mu
moodysalem
moodysalem commented Jun 20, 2019

From the docs

The factor option is used to grow the delay exponentially. For example, a value of 2 will cause the delay to double each time. A value of 3 will cause the delay to triple each time. Fractional factors (e.g. 1.5) are also allowed.

The following formula is used to calculate delay using the factor:

delay = delay * Math.pow(factor, attemptNum)

(default: 0)

Th

Improve this page

Add a description, image, and links to the retry topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the retry topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.