kubernetes/pkg/kubectl
Clayton Coleman 3b780c64b8
Always negotiate a decoder using ClientNegotiator
This commit performs two refactors and fixes a bug.

Refactor 1 changes the signature of Request to take a RESTClient, which
removes the extra copy of everything on RESTClient from Request. A pair
of optional constructors are added for testing. The major functional
change is that Request no longer has the shim HTTPClient interface and
so some test cases change slightly because we are now going through
http.Client code paths instead of direct to our test stubs.

Refactor 2 changes the signature of RESTClient to take a
ClientContentConfig instead of ContentConfig - the primary difference
being that ClientContentConfig uses ClientNegotiator instead of
NegotiatedSerializer and the old Serializers type. We also collapse
some redundancies (like the rate limiter can be created outside the
constructor).

The bug fix is to negotiate the streaming content type on a Watch()
like we do for requests. We stop caching the decoder and simply
resolve it on the request. We also clean up the dynamic client
and remove the extra WatchSpecificVersions() method by providing
a properly wrapped dynamic client.
2019-11-10 21:30:36 -05:00
..
cmd Always negotiate a decoder using ClientNegotiator 2019-11-10 21:30:36 -05:00
.import-restrictions remove pkg/version and some of redundant copies of it 2019-09-16 16:24:35 -07:00
BUILD Merge pull request #80761 from seans3/refactor-kubectl-condition 2019-07-31 20:08:50 -07:00
doc.go
OWNERS Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00