Open newsdy opened 4 years ago
I also had this need. Added in #198.
Can retry timeout be configured? Retry several times, if the limit timeout is exceeded, break the request。
Yes, you can configure the interval with the option that I added, but otherwise you have the buffer expression to use:
buffer.Retry(`IsNetworkError() && Attempts() <= 2`),
buffer.RetrySleep(time.Second))
That would do up to two attempts, sleeping for one second in between. You can set a request timeout with a custom transport provided to the load balancer middleware.
Can retry interval be configured? have this function?