aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-10-11 18:43:10 +0200
committerGitHub <noreply@github.com>2021-10-11 18:43:10 +0200
commitb1a2657b4b00b35edd6eb1073631bc0f8c6c5c78 (patch)
tree785186a333cc4622de954ad96de4d9a8274476be /pkg
parentea868933e8c014ac52192f397f5dc1c3e8ee375a (diff)
parent6f9e9ee9ece7396a2b769c1e240eaa893cfce2ae (diff)
downloadpodman-b1a2657b4b00b35edd6eb1073631bc0f8c6c5c78.tar.gz
podman-b1a2657b4b00b35edd6eb1073631bc0f8c6c5c78.tar.bz2
podman-b1a2657b4b00b35edd6eb1073631bc0f8c6c5c78.zip
Merge pull request #11819 from trynaeat/dial-stdio
Adding dial-stdio CLI cmd
Diffstat (limited to 'pkg')
-rw-r--r--pkg/bindings/connection.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/bindings/connection.go b/pkg/bindings/connection.go
index e2c46e481..dc75dac5a 100644
--- a/pkg/bindings/connection.go
+++ b/pkg/bindings/connection.go
@@ -349,6 +349,17 @@ func (c *Connection) DoRequest(httpBody io.Reader, httpMethod, endpoint string,
return &APIResponse{response, req}, err
}
+// Get raw Transport.DialContext from client
+func (c *Connection) GetDialer(ctx context.Context) (net.Conn, error) {
+ client := c.Client
+ transport := client.Transport.(*http.Transport)
+ if transport.DialContext != nil && transport.TLSClientConfig == nil {
+ return transport.DialContext(ctx, c.URI.Scheme, c.URI.String())
+ }
+
+ return nil, errors.New("Unable to get dial context")
+}
+
// FiltersToString converts our typical filter format of a
// map[string][]string to a query/html safe string.
func FiltersToString(filters map[string][]string) (string, error) {