MCPcopy
hub / github.com/kubernetes/client-go / HTTPWrappersForConfig

Function HTTPWrappersForConfig

rest/transport.go:53–59  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

51// the underlying connection (like WebSocket or HTTP2 clients). Pure HTTP clients should use
52// the higher level TransportFor or RESTClientFor methods.
53func 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.
62func (c *Config) TransportConfig() (*transport.Config, error) {

Callers

nothing calls this directly

Calls 2

HTTPWrappersForConfigFunction · 0.92
TransportConfigMethod · 0.80

Tested by

no test coverage detected