fix: add retry configuration for HTTP requests in provider
This commit is contained in:
parent
bbdb85adfe
commit
83cb45b57c
1 changed files with 11 additions and 0 deletions
|
|
@ -45,6 +45,17 @@ var (
|
|||
_ provider.Provider = &Provider{}
|
||||
)
|
||||
|
||||
const (
|
||||
// maxRetries is the maximum number of retries for a failed HTTP request.
|
||||
maxRetries = 3
|
||||
// initialDelay is the initial delay before the first retry attempt.
|
||||
initialDelay = 2 * time.Second
|
||||
// maxDelay is the maximum delay between retry attempts.
|
||||
maxDelay = 90 * time.Second
|
||||
// perTryTimeout is the timeout for each individual HTTP request attempt.
|
||||
perTryTimeout = 30 * time.Second
|
||||
)
|
||||
|
||||
// Provider is the provider implementation.
|
||||
type Provider struct {
|
||||
version string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue