Skip to content

Commit

Permalink
use the configurable timeout sensibly
Browse files Browse the repository at this point in the history
  • Loading branch information
klaernie committed Feb 6, 2024
1 parent 322f4dc commit de7cc01
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/utils/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ var Client *http.Client
func init () {

Check failure on line 19 in pkg/utils/client.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gci`-ed with --skip-generated -s standard -s default (gci)
var retryableClient = retryablehttp.NewClient()
retryableClient.Logger = nil
retryableClient.Backoff = retryablehttp.LinearJitterBackoff
var timeout = time.Duration(timeoutFromConfig()) * time.Second

Check failure on line 23 in pkg/utils/client.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gofumpt`-ed (gofumpt)
retryableClient.RetryWaitMin = timeout / 10
retryableClient.RetryWaitMax = timeout
Client = retryableClient.StandardClient()

}

Check failure on line 28 in pkg/utils/client.go

View workflow job for this annotation

GitHub Actions / lint

unnecessary trailing newline (whitespace)

0 comments on commit de7cc01

Please sign in to comment.