mirror of
https://github.com/kubernetes/client-go.git
synced 2026-06-24 02:34:28 +00:00
Compare commits
18 Commits
kubernetes
...
kubernetes
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33bed69e72 | ||
|
|
791991630f | ||
|
|
961ecfb9a2 | ||
|
|
33d45c1319 | ||
|
|
61141c1efe | ||
|
|
bdfc4cfc12 | ||
|
|
12e8bc7b09 | ||
|
|
02384dbe12 | ||
|
|
32a482af20 | ||
|
|
d0ef5a1c7d | ||
|
|
03b9b1062a | ||
|
|
30599d9dba | ||
|
|
453b064209 | ||
|
|
5f3a23fd53 | ||
|
|
29424b90cb | ||
|
|
b46e3962ed | ||
|
|
3e9a51baf5 | ||
|
|
5798b4e636 |
184
Godeps/Godeps.json
generated
184
Godeps/Godeps.json
generated
@@ -188,7 +188,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/crypto/ssh/terminal",
|
||||
"Rev": "49796115aa4b964c318aad4f3084fdb41e9aa067"
|
||||
"Rev": "de0752318171da717af4ce24d0a2e8626afaeb11"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net/context",
|
||||
@@ -272,331 +272,331 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/admissionregistration/v1alpha1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/admissionregistration/v1beta1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/apps/v1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/apps/v1beta1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/apps/v1beta2",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authentication/v1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authentication/v1beta1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authorization/v1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authorization/v1beta1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/autoscaling/v1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/autoscaling/v2beta1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/batch/v1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/batch/v1beta1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/batch/v2alpha1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/certificates/v1beta1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/coordination/v1beta1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/core/v1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/events/v1beta1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/extensions/v1beta1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/imagepolicy/v1alpha1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/networking/v1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/policy/v1beta1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/rbac/v1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/rbac/v1alpha1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/rbac/v1beta1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/scheduling/v1alpha1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/scheduling/v1beta1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/settings/v1alpha1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/storage/v1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/storage/v1alpha1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/storage/v1beta1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "2b76beb439ecc68a523fa24b9e98b50c40fa7292"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting",
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/fuzzer",
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/roundtrip",
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/testing",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/fields",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/labels",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/selection",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/types",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/cache",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/clock",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/naming",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/version",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/watch",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
|
||||
"Rev": "183f3326a9353bd6d41430fc80f96259331d029c"
|
||||
"Rev": "d303caecb8ef47c7025a3c27fcf859cc35404073"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/util/proto",
|
||||
|
||||
@@ -107,11 +107,11 @@ type oldResourceShimType struct {
|
||||
}
|
||||
|
||||
func (s oldResourceShimType) Create(obj *unstructured.Unstructured) (*unstructured.Unstructured, error) {
|
||||
return s.ResourceInterface.Create(obj, s.subresources...)
|
||||
return s.ResourceInterface.Create(obj, metav1.CreateOptions{}, s.subresources...)
|
||||
}
|
||||
|
||||
func (s oldResourceShimType) Update(obj *unstructured.Unstructured) (*unstructured.Unstructured, error) {
|
||||
return s.ResourceInterface.Update(obj, s.subresources...)
|
||||
return s.ResourceInterface.Update(obj, metav1.UpdateOptions{}, s.subresources...)
|
||||
}
|
||||
|
||||
func (s oldResourceShimType) Delete(name string, opts *metav1.DeleteOptions) error {
|
||||
@@ -127,5 +127,5 @@ func (s oldResourceShimType) List(opts metav1.ListOptions) (runtime.Object, erro
|
||||
}
|
||||
|
||||
func (s oldResourceShimType) Patch(name string, pt types.PatchType, data []byte) (*unstructured.Unstructured, error) {
|
||||
return s.ResourceInterface.Patch(name, pt, data, s.subresources...)
|
||||
return s.ResourceInterface.Patch(name, pt, data, metav1.UpdateOptions{}, s.subresources...)
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import (
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/gregjones/httpcache"
|
||||
"github.com/gregjones/httpcache/diskcache"
|
||||
"github.com/peterbourgon/diskv"
|
||||
@@ -47,4 +48,15 @@ func (rt *cacheRoundTripper) RoundTrip(req *http.Request) (*http.Response, error
|
||||
return rt.rt.RoundTrip(req)
|
||||
}
|
||||
|
||||
func (rt *cacheRoundTripper) CancelRequest(req *http.Request) {
|
||||
type canceler interface {
|
||||
CancelRequest(*http.Request)
|
||||
}
|
||||
if cr, ok := rt.rt.Transport.(canceler); ok {
|
||||
cr.CancelRequest(req)
|
||||
} else {
|
||||
glog.Errorf("CancelRequest not implemented by %T", rt.rt.Transport)
|
||||
}
|
||||
}
|
||||
|
||||
func (rt *cacheRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt.Transport }
|
||||
|
||||
@@ -404,7 +404,7 @@ func TestCreate(t *testing.T) {
|
||||
}
|
||||
defer srv.Close()
|
||||
|
||||
got, err := cl.Resource(resource).Namespace(tc.namespace).Create(tc.obj, tc.subresource...)
|
||||
got, err := cl.Resource(resource).Namespace(tc.namespace).Create(tc.obj, metav1.CreateOptions{}, tc.subresource...)
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error when creating %q: %v", tc.name, err)
|
||||
continue
|
||||
@@ -481,7 +481,7 @@ func TestUpdate(t *testing.T) {
|
||||
}
|
||||
defer srv.Close()
|
||||
|
||||
got, err := cl.Resource(resource).Namespace(tc.namespace).Update(tc.obj, tc.subresource...)
|
||||
got, err := cl.Resource(resource).Namespace(tc.namespace).Update(tc.obj, metav1.UpdateOptions{}, tc.subresource...)
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error when updating %q: %v", tc.name, err)
|
||||
continue
|
||||
@@ -638,7 +638,7 @@ func TestPatch(t *testing.T) {
|
||||
}
|
||||
defer srv.Close()
|
||||
|
||||
got, err := cl.Resource(resource).Namespace(tc.namespace).Patch(tc.name, types.StrategicMergePatchType, tc.patch, tc.subresource...)
|
||||
got, err := cl.Resource(resource).Namespace(tc.namespace).Patch(tc.name, types.StrategicMergePatchType, tc.patch, metav1.UpdateOptions{}, tc.subresource...)
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error when patching %q: %v", tc.name, err)
|
||||
continue
|
||||
|
||||
@@ -86,7 +86,7 @@ func (c *dynamicResourceClient) Namespace(ns string) dynamic.ResourceInterface {
|
||||
return &ret
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, opts metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
var uncastRet runtime.Object
|
||||
var err error
|
||||
switch {
|
||||
@@ -132,7 +132,7 @@ func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, subresour
|
||||
return ret, err
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, opts metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
var uncastRet runtime.Object
|
||||
var err error
|
||||
switch {
|
||||
@@ -168,7 +168,7 @@ func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, subresour
|
||||
return ret, err
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured) (*unstructured.Unstructured, error) {
|
||||
func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured, opts metav1.UpdateOptions) (*unstructured.Unstructured, error) {
|
||||
var uncastRet runtime.Object
|
||||
var err error
|
||||
switch {
|
||||
@@ -331,7 +331,7 @@ func (c *dynamicResourceClient) Watch(opts metav1.ListOptions) (watch.Interface,
|
||||
panic("math broke")
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
func (c *dynamicResourceClient) Patch(name string, pt types.PatchType, data []byte, opts metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
var uncastRet runtime.Object
|
||||
var err error
|
||||
switch {
|
||||
|
||||
@@ -29,15 +29,15 @@ type Interface interface {
|
||||
}
|
||||
|
||||
type ResourceInterface interface {
|
||||
Create(obj *unstructured.Unstructured, subresources ...string) (*unstructured.Unstructured, error)
|
||||
Update(obj *unstructured.Unstructured, subresources ...string) (*unstructured.Unstructured, error)
|
||||
UpdateStatus(obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
|
||||
Create(obj *unstructured.Unstructured, options metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error)
|
||||
Update(obj *unstructured.Unstructured, options metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error)
|
||||
UpdateStatus(obj *unstructured.Unstructured, options metav1.UpdateOptions) (*unstructured.Unstructured, error)
|
||||
Delete(name string, options *metav1.DeleteOptions, subresources ...string) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error)
|
||||
List(opts metav1.ListOptions) (*unstructured.UnstructuredList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*unstructured.Unstructured, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, options metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error)
|
||||
}
|
||||
|
||||
type NamespaceableResourceInterface interface {
|
||||
|
||||
@@ -82,7 +82,7 @@ func (c *dynamicResourceClient) Namespace(ns string) ResourceInterface {
|
||||
return &ret
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, opts metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
outBytes, err := runtime.Encode(unstructured.UnstructuredJSONScheme, obj)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -96,7 +96,12 @@ func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, subresour
|
||||
name = accessor.GetName()
|
||||
}
|
||||
|
||||
result := c.client.client.Post().AbsPath(append(c.makeURLSegments(name), subresources...)...).Body(outBytes).Do()
|
||||
result := c.client.client.
|
||||
Post().
|
||||
AbsPath(append(c.makeURLSegments(name), subresources...)...).
|
||||
Body(outBytes).
|
||||
SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).
|
||||
Do()
|
||||
if err := result.Error(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -112,7 +117,7 @@ func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, subresour
|
||||
return uncastObj.(*unstructured.Unstructured), nil
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, opts metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
accessor, err := meta.Accessor(obj)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -122,7 +127,12 @@ func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, subresour
|
||||
return nil, err
|
||||
}
|
||||
|
||||
result := c.client.client.Put().AbsPath(append(c.makeURLSegments(accessor.GetName()), subresources...)...).Body(outBytes).Do()
|
||||
result := c.client.client.
|
||||
Put().
|
||||
AbsPath(append(c.makeURLSegments(accessor.GetName()), subresources...)...).
|
||||
Body(outBytes).
|
||||
SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).
|
||||
Do()
|
||||
if err := result.Error(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -138,7 +148,7 @@ func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, subresour
|
||||
return uncastObj.(*unstructured.Unstructured), nil
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured) (*unstructured.Unstructured, error) {
|
||||
func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured, opts metav1.UpdateOptions) (*unstructured.Unstructured, error) {
|
||||
accessor, err := meta.Accessor(obj)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -149,7 +159,12 @@ func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured) (*u
|
||||
return nil, err
|
||||
}
|
||||
|
||||
result := c.client.client.Put().AbsPath(append(c.makeURLSegments(accessor.GetName()), "status")...).Body(outBytes).Do()
|
||||
result := c.client.client.
|
||||
Put().
|
||||
AbsPath(append(c.makeURLSegments(accessor.GetName()), "status")...).
|
||||
Body(outBytes).
|
||||
SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).
|
||||
Do()
|
||||
if err := result.Error(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -174,7 +189,11 @@ func (c *dynamicResourceClient) Delete(name string, opts *metav1.DeleteOptions,
|
||||
return err
|
||||
}
|
||||
|
||||
result := c.client.client.Delete().AbsPath(append(c.makeURLSegments(name), subresources...)...).Body(deleteOptionsByte).Do()
|
||||
result := c.client.client.
|
||||
Delete().
|
||||
AbsPath(append(c.makeURLSegments(name), subresources...)...).
|
||||
Body(deleteOptionsByte).
|
||||
Do()
|
||||
return result.Error()
|
||||
}
|
||||
|
||||
@@ -187,7 +206,12 @@ func (c *dynamicResourceClient) DeleteCollection(opts *metav1.DeleteOptions, lis
|
||||
return err
|
||||
}
|
||||
|
||||
result := c.client.client.Delete().AbsPath(c.makeURLSegments("")...).Body(deleteOptionsByte).SpecificallyVersionedParams(&listOptions, dynamicParameterCodec, versionV1).Do()
|
||||
result := c.client.client.
|
||||
Delete().
|
||||
AbsPath(c.makeURLSegments("")...).
|
||||
Body(deleteOptionsByte).
|
||||
SpecificallyVersionedParams(&listOptions, dynamicParameterCodec, versionV1).
|
||||
Do()
|
||||
return result.Error()
|
||||
}
|
||||
|
||||
@@ -259,8 +283,13 @@ func (c *dynamicResourceClient) Watch(opts metav1.ListOptions) (watch.Interface,
|
||||
WatchWithSpecificDecoders(wrappedDecoderFn, unstructured.UnstructuredJSONScheme)
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
result := c.client.client.Patch(pt).AbsPath(append(c.makeURLSegments(name), subresources...)...).Body(data).Do()
|
||||
func (c *dynamicResourceClient) Patch(name string, pt types.PatchType, data []byte, opts metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
result := c.client.client.
|
||||
Patch(pt).
|
||||
AbsPath(append(c.makeURLSegments(name), subresources...)...).
|
||||
Body(data).
|
||||
SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).
|
||||
Do()
|
||||
if err := result.Error(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -23,5 +23,8 @@ import (
|
||||
|
||||
func (c *FakeSubjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) {
|
||||
obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("subjectaccessreviews"), sar), &authorizationapi.SubjectAccessReview{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*authorizationapi.SubjectAccessReview), err
|
||||
}
|
||||
|
||||
@@ -94,14 +94,10 @@ func (c *RESTClient) request(verb string) *restclient.Request {
|
||||
|
||||
ns := c.NegotiatedSerializer
|
||||
info, _ := runtime.SerializerInfoForMediaType(ns.SupportedMediaTypes(), runtime.ContentTypeJSON)
|
||||
internalVersion := schema.GroupVersion{
|
||||
Group: c.GroupVersion.Group,
|
||||
Version: runtime.APIVersionInternal,
|
||||
}
|
||||
serializers := restclient.Serializers{
|
||||
// TODO this was hardcoded before, but it doesn't look right
|
||||
Encoder: ns.EncoderForVersion(info.Serializer, c.GroupVersion),
|
||||
Decoder: ns.DecoderToVersion(info.Serializer, internalVersion),
|
||||
Decoder: ns.DecoderToVersion(info.Serializer, c.GroupVersion),
|
||||
}
|
||||
if info.StreamSerializer != nil {
|
||||
serializers.StreamingSerializer = info.StreamSerializer.Serializer
|
||||
|
||||
@@ -19,7 +19,7 @@ package scale
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"k8s.io/apimachinery/pkg/api/testing/roundtrip"
|
||||
"k8s.io/apimachinery/pkg/api/apitesting/roundtrip"
|
||||
)
|
||||
|
||||
// NB: this can't be in the scheme package, because importing'
|
||||
|
||||
@@ -126,6 +126,46 @@ func TestMergeContext(t *testing.T) {
|
||||
matchStringArg(namespace, actual, t)
|
||||
}
|
||||
|
||||
func TestModifyContext(t *testing.T) {
|
||||
expectedCtx := map[string]bool{
|
||||
"updated": true,
|
||||
"clean": true,
|
||||
}
|
||||
|
||||
pathOptions := NewDefaultPathOptions()
|
||||
config := createValidTestConfig()
|
||||
|
||||
// define new context and assign it - our path options config
|
||||
config.Contexts["updated"] = &clientcmdapi.Context{
|
||||
Cluster: "updated",
|
||||
AuthInfo: "updated",
|
||||
}
|
||||
config.CurrentContext = "updated"
|
||||
|
||||
if err := ModifyConfig(pathOptions, *config, true); err != nil {
|
||||
t.Errorf("Unexpected error: %v", err)
|
||||
}
|
||||
|
||||
startingConfig, err := pathOptions.GetStartingConfig()
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected error: %v", err)
|
||||
}
|
||||
|
||||
// make sure the current context was updated
|
||||
matchStringArg("updated", startingConfig.CurrentContext, t)
|
||||
|
||||
// there should now be two contexts
|
||||
if len(startingConfig.Contexts) != len(expectedCtx) {
|
||||
t.Fatalf("unexpected nuber of contexts, expecting %v, but found %v", len(expectedCtx), len(startingConfig.Contexts))
|
||||
}
|
||||
|
||||
for key := range startingConfig.Contexts {
|
||||
if !expectedCtx[key] {
|
||||
t.Fatalf("expected context %q to exist", key)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestCertificateData(t *testing.T) {
|
||||
caData := []byte("ca-data")
|
||||
certData := []byte("cert-data")
|
||||
|
||||
@@ -220,6 +220,9 @@ func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, rela
|
||||
}
|
||||
}
|
||||
|
||||
// seenConfigs stores a map of config source filenames to computed config objects
|
||||
seenConfigs := map[string]*clientcmdapi.Config{}
|
||||
|
||||
for key, context := range newConfig.Contexts {
|
||||
startingContext, exists := startingConfig.Contexts[key]
|
||||
if !reflect.DeepEqual(context, startingContext) || !exists {
|
||||
@@ -228,15 +231,28 @@ func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, rela
|
||||
destinationFile = configAccess.GetDefaultFilename()
|
||||
}
|
||||
|
||||
configToWrite, err := getConfigFromFile(destinationFile)
|
||||
if err != nil {
|
||||
return err
|
||||
// we only obtain a fresh config object from its source file
|
||||
// if we have not seen it already - this prevents us from
|
||||
// reading and writing to the same number of files repeatedly
|
||||
// when multiple / all contexts share the same destination file.
|
||||
configToWrite, seen := seenConfigs[destinationFile]
|
||||
if !seen {
|
||||
var err error
|
||||
configToWrite, err = getConfigFromFile(destinationFile)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
seenConfigs[destinationFile] = configToWrite
|
||||
}
|
||||
configToWrite.Contexts[key] = context
|
||||
|
||||
if err := WriteToFile(*configToWrite, destinationFile); err != nil {
|
||||
return err
|
||||
}
|
||||
configToWrite.Contexts[key] = context
|
||||
}
|
||||
}
|
||||
|
||||
// actually persist config object changes
|
||||
for destinationFile, configToWrite := range seenConfigs {
|
||||
if err := WriteToFile(*configToWrite, destinationFile); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ func (rt *authProxyRoundTripper) CancelRequest(req *http.Request) {
|
||||
if canceler, ok := rt.rt.(requestCanceler); ok {
|
||||
canceler.CancelRequest(req)
|
||||
} else {
|
||||
glog.Errorf("CancelRequest not implemented")
|
||||
glog.Errorf("CancelRequest not implemented by %T", rt.rt)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ func (rt *userAgentRoundTripper) CancelRequest(req *http.Request) {
|
||||
if canceler, ok := rt.rt.(requestCanceler); ok {
|
||||
canceler.CancelRequest(req)
|
||||
} else {
|
||||
glog.Errorf("CancelRequest not implemented")
|
||||
glog.Errorf("CancelRequest not implemented by %T", rt.rt)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ func (rt *basicAuthRoundTripper) CancelRequest(req *http.Request) {
|
||||
if canceler, ok := rt.rt.(requestCanceler); ok {
|
||||
canceler.CancelRequest(req)
|
||||
} else {
|
||||
glog.Errorf("CancelRequest not implemented")
|
||||
glog.Errorf("CancelRequest not implemented by %T", rt.rt)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ func (rt *impersonatingRoundTripper) CancelRequest(req *http.Request) {
|
||||
if canceler, ok := rt.delegate.(requestCanceler); ok {
|
||||
canceler.CancelRequest(req)
|
||||
} else {
|
||||
glog.Errorf("CancelRequest not implemented")
|
||||
glog.Errorf("CancelRequest not implemented by %T", rt.delegate)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,7 +288,7 @@ func (rt *bearerAuthRoundTripper) CancelRequest(req *http.Request) {
|
||||
if canceler, ok := rt.rt.(requestCanceler); ok {
|
||||
canceler.CancelRequest(req)
|
||||
} else {
|
||||
glog.Errorf("CancelRequest not implemented")
|
||||
glog.Errorf("CancelRequest not implemented by %T", rt.rt)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ func (rt *debuggingRoundTripper) CancelRequest(req *http.Request) {
|
||||
if canceler, ok := rt.delegatedRoundTripper.(requestCanceler); ok {
|
||||
canceler.CancelRequest(req)
|
||||
} else {
|
||||
glog.Errorf("CancelRequest not implemented")
|
||||
glog.Errorf("CancelRequest not implemented by %T", rt.delegatedRoundTripper)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
4
vendor/golang.org/x/crypto/ssh/terminal/util.go
generated
vendored
4
vendor/golang.org/x/crypto/ssh/terminal/util.go
generated
vendored
@@ -108,9 +108,7 @@ func ReadPassword(fd int) ([]byte, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
defer func() {
|
||||
unix.IoctlSetTermios(fd, ioctlWriteTermios, termios)
|
||||
}()
|
||||
defer unix.IoctlSetTermios(fd, ioctlWriteTermios, termios)
|
||||
|
||||
return readPasswordLine(passwordReader(fd))
|
||||
}
|
||||
|
||||
36
vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go
generated
vendored
36
vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go
generated
vendored
@@ -14,7 +14,7 @@ import (
|
||||
|
||||
// State contains the state of a terminal.
|
||||
type State struct {
|
||||
state *unix.Termios
|
||||
termios unix.Termios
|
||||
}
|
||||
|
||||
// IsTerminal returns true if the given file descriptor is a terminal.
|
||||
@@ -75,47 +75,43 @@ func ReadPassword(fd int) ([]byte, error) {
|
||||
// restored.
|
||||
// see http://cr.illumos.org/~webrev/andy_js/1060/
|
||||
func MakeRaw(fd int) (*State, error) {
|
||||
oldTermiosPtr, err := unix.IoctlGetTermios(fd, unix.TCGETS)
|
||||
termios, err := unix.IoctlGetTermios(fd, unix.TCGETS)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
oldTermios := *oldTermiosPtr
|
||||
|
||||
newTermios := oldTermios
|
||||
newTermios.Iflag &^= syscall.IGNBRK | syscall.BRKINT | syscall.PARMRK | syscall.ISTRIP | syscall.INLCR | syscall.IGNCR | syscall.ICRNL | syscall.IXON
|
||||
newTermios.Oflag &^= syscall.OPOST
|
||||
newTermios.Lflag &^= syscall.ECHO | syscall.ECHONL | syscall.ICANON | syscall.ISIG | syscall.IEXTEN
|
||||
newTermios.Cflag &^= syscall.CSIZE | syscall.PARENB
|
||||
newTermios.Cflag |= syscall.CS8
|
||||
newTermios.Cc[unix.VMIN] = 1
|
||||
newTermios.Cc[unix.VTIME] = 0
|
||||
oldState := State{termios: *termios}
|
||||
|
||||
if err := unix.IoctlSetTermios(fd, unix.TCSETS, &newTermios); err != nil {
|
||||
termios.Iflag &^= unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON
|
||||
termios.Oflag &^= unix.OPOST
|
||||
termios.Lflag &^= unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN
|
||||
termios.Cflag &^= unix.CSIZE | unix.PARENB
|
||||
termios.Cflag |= unix.CS8
|
||||
termios.Cc[unix.VMIN] = 1
|
||||
termios.Cc[unix.VTIME] = 0
|
||||
|
||||
if err := unix.IoctlSetTermios(fd, unix.TCSETS, termios); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &State{
|
||||
state: oldTermiosPtr,
|
||||
}, nil
|
||||
return &oldState, nil
|
||||
}
|
||||
|
||||
// Restore restores the terminal connected to the given file descriptor to a
|
||||
// previous state.
|
||||
func Restore(fd int, oldState *State) error {
|
||||
return unix.IoctlSetTermios(fd, unix.TCSETS, oldState.state)
|
||||
return unix.IoctlSetTermios(fd, unix.TCSETS, &oldState.termios)
|
||||
}
|
||||
|
||||
// GetState returns the current state of a terminal which may be useful to
|
||||
// restore the terminal after a signal.
|
||||
func GetState(fd int) (*State, error) {
|
||||
oldTermiosPtr, err := unix.IoctlGetTermios(fd, unix.TCGETS)
|
||||
termios, err := unix.IoctlGetTermios(fd, unix.TCGETS)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &State{
|
||||
state: oldTermiosPtr,
|
||||
}, nil
|
||||
return &State{termios: *termios}, nil
|
||||
}
|
||||
|
||||
// GetSize returns the dimensions of the given terminal.
|
||||
|
||||
4
vendor/golang.org/x/crypto/ssh/terminal/util_windows.go
generated
vendored
4
vendor/golang.org/x/crypto/ssh/terminal/util_windows.go
generated
vendored
@@ -89,9 +89,7 @@ func ReadPassword(fd int) ([]byte, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
defer func() {
|
||||
windows.SetConsoleMode(windows.Handle(fd), old)
|
||||
}()
|
||||
defer windows.SetConsoleMode(windows.Handle(fd), old)
|
||||
|
||||
var h windows.Handle
|
||||
p, _ := windows.GetCurrentProcess()
|
||||
|
||||
Reference in New Issue
Block a user