diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-05-08 21:12:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-08 21:12:19 +0200 |
commit | 49e09ddbf5a17eab025f661d4f57e5868181d57a (patch) | |
tree | f3fde54b86541bb67d5c3ef5d3ba4dba0c831676 /vendor | |
parent | 7b54ebb48fecb4205304586a57a3e6b9b96befa0 (diff) | |
parent | 38199f4c28712912ea857bf9938dc8ea3798ca61 (diff) | |
download | podman-49e09ddbf5a17eab025f661d4f57e5868181d57a.tar.gz podman-49e09ddbf5a17eab025f661d4f57e5868181d57a.tar.bz2 podman-49e09ddbf5a17eab025f661d4f57e5868181d57a.zip |
Merge pull request #3042 from baude/bridge
add varlink bridge
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/github.com/varlink/go/varlink/bridge.go | 11 | ||||
-rw-r--r-- | vendor/github.com/varlink/go/varlink/bridge_windows.go | 11 |
2 files changed, 18 insertions, 4 deletions
diff --git a/vendor/github.com/varlink/go/varlink/bridge.go b/vendor/github.com/varlink/go/varlink/bridge.go index 0ea5de682..c478dcd88 100644 --- a/vendor/github.com/varlink/go/varlink/bridge.go +++ b/vendor/github.com/varlink/go/varlink/bridge.go @@ -6,6 +6,7 @@ import ( "bufio" "io" "net" + "os" "os/exec" ) @@ -30,12 +31,13 @@ func (p PipeCon) Close() error { return nil } -// NewConnection returns a new connection to the given address. -func NewBridge(bridge string) (*Connection, error) { +// NewBridgeWithStderr returns a new connection with the given bridge. +func NewBridgeWithStderr(bridge string, stderr io.Writer) (*Connection, error) { //var err error c := Connection{} cmd := exec.Command("sh", "-c", bridge) + cmd.Stderr = stderr r, err := cmd.StdoutPipe() if err != nil { return nil, err @@ -56,3 +58,8 @@ func NewBridge(bridge string) (*Connection, error) { return &c, nil } + +// NewBridge returns a new connection with the given bridge. +func NewBridge(bridge string) (*Connection, error) { + return NewBridgeWithStderr(bridge, os.Stderr) +} diff --git a/vendor/github.com/varlink/go/varlink/bridge_windows.go b/vendor/github.com/varlink/go/varlink/bridge_windows.go index 751224ec8..42953b871 100644 --- a/vendor/github.com/varlink/go/varlink/bridge_windows.go +++ b/vendor/github.com/varlink/go/varlink/bridge_windows.go @@ -4,6 +4,7 @@ import ( "bufio" "io" "net" + "os" "os/exec" ) @@ -28,12 +29,13 @@ func (p PipeCon) Close() error { return nil } -// NewConnection returns a new connection to the given address. -func NewBridge(bridge string) (*Connection, error) { +// NewBridgeWithStderr returns a new connection with the given bridge. +func NewBridgeWithStderr(bridge string, stderr io.Writer) (*Connection, error) { //var err error c := Connection{} cmd := exec.Command("cmd", "/C", bridge) + cmd.Stderr = stderr r, err := cmd.StdoutPipe() if err != nil { return nil, err @@ -54,3 +56,8 @@ func NewBridge(bridge string) (*Connection, error) { return &c, nil } + +// NewBridge returns a new connection with the given bridge. +func NewBridge(bridge string) (*Connection, error) { + return NewBridgeWithStderr(bridge, os.Stderr) +}
\ No newline at end of file |