Merge pull request #55974 from liggitt/spdy-transport-constructor

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Allow constructing spdy executor from existing transports

If you already have an existing transport, it is not always possible to reconstruct a client config from it.

Allow constructing a spdy executor, given a connection/upgrade transport

```release-note
NONE
```

Kubernetes-commit: 294f28f25d3a420b6a5efffac7fe8b76a70c6529
This commit is contained in:
Kubernetes Publisher 2017-11-20 08:11:13 -08:00
commit f14e54e4a9
3 changed files with 95 additions and 92 deletions

160
Godeps/Godeps.json generated
View File

@ -372,323 +372,323 @@
}, },
{ {
"ImportPath": "k8s.io/api/admissionregistration/v1alpha1", "ImportPath": "k8s.io/api/admissionregistration/v1alpha1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/apps/v1", "ImportPath": "k8s.io/api/apps/v1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/apps/v1beta1", "ImportPath": "k8s.io/api/apps/v1beta1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/apps/v1beta2", "ImportPath": "k8s.io/api/apps/v1beta2",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/authentication/v1", "ImportPath": "k8s.io/api/authentication/v1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/authentication/v1beta1", "ImportPath": "k8s.io/api/authentication/v1beta1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/authorization/v1", "ImportPath": "k8s.io/api/authorization/v1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/authorization/v1beta1", "ImportPath": "k8s.io/api/authorization/v1beta1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/autoscaling/v1", "ImportPath": "k8s.io/api/autoscaling/v1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/autoscaling/v2beta1", "ImportPath": "k8s.io/api/autoscaling/v2beta1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/batch/v1", "ImportPath": "k8s.io/api/batch/v1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/batch/v1beta1", "ImportPath": "k8s.io/api/batch/v1beta1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/batch/v2alpha1", "ImportPath": "k8s.io/api/batch/v2alpha1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/certificates/v1beta1", "ImportPath": "k8s.io/api/certificates/v1beta1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/core/v1", "ImportPath": "k8s.io/api/core/v1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/extensions/v1beta1", "ImportPath": "k8s.io/api/extensions/v1beta1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/imagepolicy/v1alpha1", "ImportPath": "k8s.io/api/imagepolicy/v1alpha1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/networking/v1", "ImportPath": "k8s.io/api/networking/v1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/policy/v1beta1", "ImportPath": "k8s.io/api/policy/v1beta1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/rbac/v1", "ImportPath": "k8s.io/api/rbac/v1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/rbac/v1alpha1", "ImportPath": "k8s.io/api/rbac/v1alpha1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/rbac/v1beta1", "ImportPath": "k8s.io/api/rbac/v1beta1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/scheduling/v1alpha1", "ImportPath": "k8s.io/api/scheduling/v1alpha1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/settings/v1alpha1", "ImportPath": "k8s.io/api/settings/v1alpha1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/storage/v1", "ImportPath": "k8s.io/api/storage/v1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/storage/v1alpha1", "ImportPath": "k8s.io/api/storage/v1alpha1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/api/storage/v1beta1", "ImportPath": "k8s.io/api/storage/v1beta1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/equality", "ImportPath": "k8s.io/apimachinery/pkg/api/equality",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/errors", "ImportPath": "k8s.io/apimachinery/pkg/api/errors",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/meta", "ImportPath": "k8s.io/apimachinery/pkg/api/meta",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/resource", "ImportPath": "k8s.io/apimachinery/pkg/api/resource",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/testing", "ImportPath": "k8s.io/apimachinery/pkg/api/testing",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer", "ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip", "ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery", "ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced", "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered", "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1alpha1", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1alpha1",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/conversion", "ImportPath": "k8s.io/apimachinery/pkg/conversion",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/fields", "ImportPath": "k8s.io/apimachinery/pkg/fields",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/labels", "ImportPath": "k8s.io/apimachinery/pkg/labels",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime", "ImportPath": "k8s.io/apimachinery/pkg/runtime",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/selection", "ImportPath": "k8s.io/apimachinery/pkg/selection",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/types", "ImportPath": "k8s.io/apimachinery/pkg/types",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/cache", "ImportPath": "k8s.io/apimachinery/pkg/util/cache",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/clock", "ImportPath": "k8s.io/apimachinery/pkg/util/clock",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/diff", "ImportPath": "k8s.io/apimachinery/pkg/util/diff",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/errors", "ImportPath": "k8s.io/apimachinery/pkg/util/errors",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/framer", "ImportPath": "k8s.io/apimachinery/pkg/util/framer",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream", "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy", "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr", "ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/json", "ImportPath": "k8s.io/apimachinery/pkg/util/json",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch", "ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/net", "ImportPath": "k8s.io/apimachinery/pkg/util/net",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand", "ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime", "ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/sets", "ImportPath": "k8s.io/apimachinery/pkg/util/sets",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch", "ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/validation", "ImportPath": "k8s.io/apimachinery/pkg/util/validation",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/wait", "ImportPath": "k8s.io/apimachinery/pkg/util/wait",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml", "ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/version", "ImportPath": "k8s.io/apimachinery/pkg/version",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/watch", "ImportPath": "k8s.io/apimachinery/pkg/watch",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
"Rev": "2de4f10de999ef5b857c77223949ff104db5e9dd" "Rev": "ee50df89e1d51862db9e60e3f2d731ca25da5576"
}, },
{ {
"ImportPath": "k8s.io/kube-openapi/pkg/common", "ImportPath": "k8s.io/kube-openapi/pkg/common",

View File

@ -42,7 +42,6 @@ go_library(
"//vendor/k8s.io/apimachinery/pkg/util/remotecommand:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/remotecommand:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
"//vendor/k8s.io/client-go/rest:go_default_library", "//vendor/k8s.io/client-go/rest:go_default_library",
"//vendor/k8s.io/client-go/transport:go_default_library",
"//vendor/k8s.io/client-go/transport/spdy:go_default_library", "//vendor/k8s.io/client-go/transport/spdy:go_default_library",
"//vendor/k8s.io/client-go/util/exec:go_default_library", "//vendor/k8s.io/client-go/util/exec:go_default_library",
], ],

View File

@ -27,7 +27,6 @@ import (
"k8s.io/apimachinery/pkg/util/httpstream" "k8s.io/apimachinery/pkg/util/httpstream"
"k8s.io/apimachinery/pkg/util/remotecommand" "k8s.io/apimachinery/pkg/util/remotecommand"
restclient "k8s.io/client-go/rest" restclient "k8s.io/client-go/rest"
"k8s.io/client-go/transport"
spdy "k8s.io/client-go/transport/spdy" spdy "k8s.io/client-go/transport/spdy"
) )
@ -72,8 +71,18 @@ type streamExecutor struct {
// NewSPDYExecutor connects to the provided server and upgrades the connection to // NewSPDYExecutor connects to the provided server and upgrades the connection to
// multiplexed bidirectional streams. // multiplexed bidirectional streams.
func NewSPDYExecutor(config *restclient.Config, method string, url *url.URL) (Executor, error) { func NewSPDYExecutor(config *restclient.Config, method string, url *url.URL) (Executor, error) {
wrapper, upgradeRoundTripper, err := spdy.RoundTripperFor(config)
if err != nil {
return nil, err
}
return NewSPDYExecutorForTransports(wrapper, upgradeRoundTripper, method, url)
}
// NewSPDYExecutorForTransports connects to the provided server using the given transport,
// upgrades the response using the given upgrader to multiplexed bidirectional streams.
func NewSPDYExecutorForTransports(transport http.RoundTripper, upgrader spdy.Upgrader, method string, url *url.URL) (Executor, error) {
return NewSPDYExecutorForProtocols( return NewSPDYExecutorForProtocols(
config, method, url, transport, upgrader, method, url,
remotecommand.StreamProtocolV4Name, remotecommand.StreamProtocolV4Name,
remotecommand.StreamProtocolV3Name, remotecommand.StreamProtocolV3Name,
remotecommand.StreamProtocolV2Name, remotecommand.StreamProtocolV2Name,
@ -83,16 +92,11 @@ func NewSPDYExecutor(config *restclient.Config, method string, url *url.URL) (Ex
// NewSPDYExecutorForProtocols connects to the provided server and upgrades the connection to // NewSPDYExecutorForProtocols connects to the provided server and upgrades the connection to
// multiplexed bidirectional streams using only the provided protocols. Exposed for testing, most // multiplexed bidirectional streams using only the provided protocols. Exposed for testing, most
// callers should use NewSPDYExecutor. // callers should use NewSPDYExecutor or NewSPDYExecutorForTransports.
func NewSPDYExecutorForProtocols(config *restclient.Config, method string, url *url.URL, protocols ...string) (Executor, error) { func NewSPDYExecutorForProtocols(transport http.RoundTripper, upgrader spdy.Upgrader, method string, url *url.URL, protocols ...string) (Executor, error) {
wrapper, upgradeRoundTripper, err := spdy.RoundTripperFor(config)
if err != nil {
return nil, err
}
wrapper = transport.DebugWrappers(wrapper)
return &streamExecutor{ return &streamExecutor{
upgrader: upgradeRoundTripper, upgrader: upgrader,
transport: wrapper, transport: transport,
method: method, method: method,
url: url, url: url,
protocols: protocols, protocols: protocols,