Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffer: retry request time interval #191

Open
newsdy opened this issue Dec 20, 2019 · 3 comments
Open

Buffer: retry request time interval #191

newsdy opened this issue Dec 20, 2019 · 3 comments

Comments

@newsdy
Copy link

newsdy commented Dec 20, 2019

Can retry interval be configured? have this function?

@dustin-decker
Copy link

I also had this need. Added in #198.

@chzhuo
Copy link

chzhuo commented May 21, 2020

Can retry timeout be configured? Retry several times, if the limit timeout is exceeded, break the request。

@dustin-decker
Copy link

dustin-decker commented May 29, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants