MCPcopy
hub / github.com/lxc/incus / getUnderlyingHTTPTransport

Method getUnderlyingHTTPTransport

client/incus.go:533–542  ·  view source on GitHub ↗

getUnderlyingHTTPTransport returns the *http.Transport used by the http client. If the http client was initialized with a HTTPTransporter, it returns the wrapped *http.Transport.

()

Source from the content-addressed store, hash-verified

531// getUnderlyingHTTPTransport returns the *http.Transport used by the http client. If the http
532// client was initialized with a HTTPTransporter, it returns the wrapped *http.Transport.
533func (r *ProtocolIncus) getUnderlyingHTTPTransport() (*http.Transport, error) {
534 switch t := r.http.Transport.(type) {
535 case *http.Transport:
536 return t, nil
537 case HTTPTransporter:
538 return t.Transport(), nil
539 default:
540 return nil, fmt.Errorf("Unexpected http.Transport type, %T", r)
541 }
542}
543
544// getSourceImageConnectionInfo returns the connection information for the source image.
545// The returned `info` is nil if the source image is local. In this process, the `instSrc`

Callers 3

rawWebsocketMethod · 0.95
GetOperationWaitMethod · 0.95
rawConnMethod · 0.95

Calls 2

TransportMethod · 0.80
ErrorfMethod · 0.80

Tested by

no test coverage detected