WithTransport returns a ClientOptionsFunc that sets the http.RoundTripper for a Client. This overrides the transport set by [WithHTTPClient]. If not set and no HTTP client is provided, the default http.RoundTripper will be used.
(transport http.RoundTripper)
| 380 | // for a Client. This overrides the transport set by [WithHTTPClient]. If not |
| 381 | // set and no HTTP client is provided, the default http.RoundTripper will be used. |
| 382 | func WithTransport(transport http.RoundTripper) ClientOptionsFunc { |
| 383 | return func(o *clientOptions) error { |
| 384 | if transport == nil { |
| 385 | return errors.New("transport must not be nil") |
| 386 | } |
| 387 | |
| 388 | o.transport = transport |
| 389 | return nil |
| 390 | } |
| 391 | } |
| 392 | |
| 393 | // WithTimeout returns a ClientOptionsFunc that sets the timeout for a Client. |
| 394 | // This overrides the timeout set by [WithHTTPClient]. If not set and no HTTP |
no outgoing calls
searching dependent graphs…