Skip to content

Conversation

@Panlq
Copy link

@Panlq Panlq commented Apr 6, 2022

  1. add unit tests TestHTTPClientGetRetriesOnTimeout
  2. fix issue Retrier called even with 0 retry count #89/fix: do not wait on zero retries #94: retrier called even with 0 retry count and time sleep will be called even when the retries are exhausted
  3. Cancel the retry sleep if the request context is canceled or the deadline exceeded

some proposal:

  1. an interface or option through which we can customize the retry policy (check error check resp.StatusCode)
  2. some times, we need to know the number of retries and responses when the retrier called. Is any idea about this?
    I implemented a version using the existing method, but it was not very good get the retry times
type Plugin interface {
	OnRequestStart(*http.Request)
	OnRequestEnd(*http.Request, *http.Response)
	// the response struct contains the request. add a attempt num when the err handler?
	OnError(*http.Response, error, int)   
}

@Panlq
Copy link
Author

Panlq commented Feb 24, 2025

@gwthm-in @sohamkamani @devdinu

Hi everyone, Is this project still under maintenance? Do you have time to review pr?

…t error instance. For systematic tracking of retry failures, utilize the logger plugin's OnError handler to implement centralized error collection.
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

Successfully merging this pull request may close these issues.

1 participant