diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-06-21 14:36:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-21 14:36:55 +0200 |
commit | 54920601ae69ca9b22bda75882425b88cd99efea (patch) | |
tree | eeb534900d899aa86daeabdc5ac1ee6d4128b730 /pkg/adapter/client.go | |
parent | c3b75b232800d2d9bee2e1975cd6e0d35509791c (diff) | |
parent | 484b4a7c4b26a9dcccee3c79ef912b721f638747 (diff) | |
download | podman-54920601ae69ca9b22bda75882425b88cd99efea.tar.gz podman-54920601ae69ca9b22bda75882425b88cd99efea.tar.bz2 podman-54920601ae69ca9b22bda75882425b88cd99efea.zip |
Merge pull request #3386 from baude/windowsbridge
add windows bridge format
Diffstat (limited to 'pkg/adapter/client.go')
-rw-r--r-- | pkg/adapter/client.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pkg/adapter/client.go b/pkg/adapter/client.go index 69aa3220a..6feae5400 100644 --- a/pkg/adapter/client.go +++ b/pkg/adapter/client.go @@ -91,3 +91,20 @@ func newSocketConnection(address string) (*Endpoint, error) { } return &endpoint, nil } + +// newBridgeConnection creates a bridge type endpoint with username, destination, and log-level +func newBridgeConnection(formattedBridge string, remoteConn *remoteclientconfig.RemoteConnection, logLevel string) (*Endpoint, error) { + endpoint := Endpoint{ + Type: BridgeConnection, + } + + if len(formattedBridge) < 1 && remoteConn == nil { + return nil, errors.New("bridge connections must either be created by string or remoteconnection") + } + if len(formattedBridge) > 0 { + endpoint.Connection = formattedBridge + return &endpoint, nil + } + endpoint.Connection = formatDefaultBridge(remoteConn, logLevel) + return &endpoint, nil +} |