kubernetes/pkg/client
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
..
conditions Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
leaderelectionconfig add options for name and namespace of leaderelection object 2019-07-30 09:46:49 +08:00
testdata Merge pull request #72525 from justinsb/owners_should_not_be_executable 2019-02-14 23:55:45 -08:00
tests Always negotiate a decoder using ClientNegotiator 2019-11-10 21:30:36 -05:00
OWNERS Remove myself from reviewers across the repo so that PRs are no 2019-08-27 16:10:16 -07:00