HTTPWrappersForConfig wraps a round tripper with any relevant layered behavior from the config. Exposed to allow more clients that need HTTP-like behavior but then must hijack the underlying connection (like WebSocket or HTTP2 clients). Pure HTTP clients should use the higher level TransportFor or R
(config *Config, rt http.RoundTripper)
| 51 | // the underlying connection (like WebSocket or HTTP2 clients). Pure HTTP clients should use |
| 52 | // the higher level TransportFor or RESTClientFor methods. |
| 53 | func HTTPWrappersForConfig(config *Config, rt http.RoundTripper) (http.RoundTripper, error) { |
| 54 | cfg, err := config.TransportConfig() |
| 55 | if err != nil { |
| 56 | return nil, err |
| 57 | } |
| 58 | return transport.HTTPWrappersForConfig(cfg, rt) |
| 59 | } |
| 60 | |
| 61 | // TransportConfig converts a client config to an appropriate transport config. |
| 62 | func (c *Config) TransportConfig() (*transport.Config, error) { |
nothing calls this directly
no test coverage detected