published by bot

(https://github.com/kubernetes/test-infra/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is c09311fa32be02ebb79c7959447e3e4294cc12a3
This commit is contained in:
Kubernetes Publisher
2017-02-01 03:06:37 +00:00
parent b766ef93a4
commit 49948ae0ca
90 changed files with 2764 additions and 2198 deletions

View File

@@ -27,12 +27,15 @@ import (
"strings"
"sync"
"k8s.io/apimachinery/pkg/util/httpstream"
"k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/client-go/pkg/api"
"k8s.io/client-go/pkg/kubelet/server/portforward"
"k8s.io/client-go/pkg/util/httpstream"
)
// TODO move to API machinery and re-unify with kubelet/server/portfoward
// The subprotocol "portforward.k8s.io" is used for port forwarding.
const PortForwardProtocolV1Name = "portforward.k8s.io"
// PortForwarder knows how to listen for local connections and forward them to
// a remote pod via an upgraded HTTP request.
type PortForwarder struct {
@@ -132,7 +135,7 @@ func (pf *PortForwarder) ForwardPorts() error {
defer pf.Close()
var err error
pf.streamConn, _, err = pf.dialer.Dial(portforward.PortForwardProtocolV1Name)
pf.streamConn, _, err = pf.dialer.Dial(PortForwardProtocolV1Name)
if err != nil {
return fmt.Errorf("error upgrading connection: %s", err)
}