summaryrefslogtreecommitdiff
path: root/pkg/bindings
diff options
context:
space:
mode:
authorJake Parks <jamesparks10@gmail.com>2021-09-30 19:41:25 +0000
committerJake Parks <jamesparks10@gmail.com>2021-10-06 19:18:26 +0000
commit6f9e9ee9ece7396a2b769c1e240eaa893cfce2ae (patch)
tree9251bf06dbad9f9a2dbcedd6c5289cce2817244a /pkg/bindings
parentbfb904bb23c53773a4414ccf4b1f66cf05d9ee80 (diff)
downloadpodman-6f9e9ee9ece7396a2b769c1e240eaa893cfce2ae.tar.gz
podman-6f9e9ee9ece7396a2b769c1e240eaa893cfce2ae.tar.bz2
podman-6f9e9ee9ece7396a2b769c1e240eaa893cfce2ae.zip
Fixes #11668
Adding dial-stdio CLI cmd Signed-off-by: Jake Parks <jamesparks10@gmail.com> Made dial-stdio URI configurable Slight refactors Signed-off-by: Jake Parks <jamesparks10@gmail.com> Added simple test for existence of `podman system dial-stdio` command Fix 'system dial-stdio' integration tests Changed link in comment to permalink
Diffstat (limited to 'pkg/bindings')
-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) {