Need Help Implementing go-resty retrycondition: Best Practices and Examples?

10 Replies, 2018 Views

Hey! For go-resty retrycondition, I’d recommend using a combination of status codes and exponential backoff.

Here’s what I do:
```go
client.SetRetryWaitTime(1 * time.Second)
client.SetRetryMaxWaitTime(10 * time.Second)
client.SetRetryCount(3)
```
This way, it’s not too aggressive. Also, check out the official go-resty GitHub repo—they’ve got some great examples in the issues section.

Messages In This Thread



Users browsing this thread: 1 Guest(s)