[chore] some tidy ups (#3677)

* small formatting changes (no logic)

* improve code comments

* fix import cycle

* shutup stinky linter
This commit is contained in:
kim
2025-01-27 15:54:59 +00:00
committed by GitHub
parent 3617e27afa
commit 726d2ba483
6 changed files with 51 additions and 47 deletions

View File

@@ -178,6 +178,9 @@ func New(cfg Config) *Client {
return &c
}
// RoundTrip allows httpclient.Client{} to be used as an http.Transport{}, just calling Client{}.Do().
func (c *Client) RoundTrip(r *http.Request) (rsp *http.Response, err error) { return c.Do(r) }
// Do will essentially perform http.Client{}.Do() with retry-backoff functionality.
func (c *Client) Do(r *http.Request) (rsp *http.Response, err error) {