Commit Graph

27 Commits (c43a106b261ebdb9022fbd9bb3d60aeb6499b738)

Author SHA1 Message Date
Wojciech Tyczynski 7403564366 Remove Codec from ContentConfig. 2016-07-08 13:53:09 +02:00
k8s-merge-robot f2ddd60eb9 Merge pull request #26755 from david-mcmahon/fix-headers
Automatic merge from submit-queue

Remove "All rights reserved" from all the headers.

cc @thockin @zmerlynn @brendanburns
2016-06-29 18:46:07 -07:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Hongchao Deng 55d3597456 change default value of QPS and burst to constant 2016-06-28 21:45:35 -07:00
Clayton Coleman e0ebcf4216
Split the storage and negotiation parts of Codecs
The codec factory should support two distinct interfaces - negotiating
for a serializer with a client, vs reading or writing data to a storage
form (etcd, disk, etc). Make the EncodeForVersion and DecodeToVersion
methods only take Encoder and Decoder, and slight refactoring elsewhere.

In the storage factory, use a content type to control what serializer to
pick, and use the universal deserializer. This ensures that storage can
read JSON (which might be from older objects) while only writing
protobuf. Add exceptions for those resources that may not be able to
write to protobuf (specifically third party resources, but potentially
others in the future).
2016-05-05 12:08:23 -04:00
Wojciech Tyczynski b4c83022e3 Add NegotiatedSerializer to config 2016-05-04 10:02:58 +02:00
zhouhaibing089 bf1a3f99c0 Uncomment the code that cause by #19254 2016-04-25 23:21:31 +08:00
Kris e664ef922f Move restclient to its own package 2016-02-29 12:05:13 -08:00
Clayton Coleman 38c7eded99 Prepare for content-type negotiation
Combine the fields that will be used for content transformation
(content-type, codec, and group version) into a single struct in client,
and then pass that struct into the rest client and request. Set the
content-type when sending requests to the server, and accept the content
type as primary.

Will form the foundation for content-negotiation via the client.
2016-01-26 17:44:30 -05:00
Clayton Coleman efe88e0818 Update client library to react to changes in Decoding 2016-01-22 13:27:24 -05:00
k8s-merge-robot 03ecde1277 Merge pull request #17535 from mesosphere/jdef_abspath_breaks_proxies
Auto commit by PR queue bot
2016-01-20 21:46:47 -08:00
James DeFelice 75f487f7bf AbsPath should be compatible with proxy-prefixes:
- replace Config.Prefix with .Host and .APIPath
- Request .path promoted to .pathPrefix, .baseURL holds required prefix
2016-01-20 00:31:58 +00:00
David Oppenheimer 8ac484793d Comment out calls to httptest.Server.Close() to work around
https://github.com/golang/go/issues/12262 . See #19254 for
more details. This change should be reverted when we upgrade
to Go 1.6.
2016-01-11 23:02:11 -08:00
Daniel Martí 91fbff99dc Properly close test http servers in unversioned
If not, using `go test -count=n` would make them pile up and ultimately
get to the limit of open files:

	client_test.go:522: expected an error, got Get http://127.0.0.1:46070/api: dial tcp 127.0.0.1:46070: socket: too many open files

Steps to reproduce (no longer fails):

	godep go test -short -run '^$' -o test .
	./test -test.run '^TestGetSwaggerSchema' -test.count 100

Note that this might not fail if your `ulimit -n` is not low enough.
2016-01-08 00:10:54 +01:00
Chao Xu f2edba3bec remove ServerAPIVersions from client
hard-code the groupVersion in SetKubernetesDefaults
2015-12-16 16:24:55 -08:00
deads2k 2ee3dfe415 update testapi to eliminate redundant fields 2015-12-07 15:54:26 -05:00
Kris e2583e294d Cleaning up test organization for impending move
I'm moving/deleting some tests to make an upcoming RESTClient refactor
PR cleaner.

 - TestDoRequestBearer is redundant to
   pkg/client/transport.TestBearerAuthRoundTripper
 - Added a case to pkg/client/transport.TestBasicAuthRoundTripper to
   cover what TestDoRequestWithoutPassword was testing
 - Moved TestSetsCodec, TestRESTClientRequires,
   TestValidateHostParameter to helper_test.go since they were really
   testing helper functions and not the RESTClient directly.
 - Modified TestValidateHostParameter during the moved to just use
   DefaultServerURL instead of creating a client.
2015-12-04 14:21:06 -08:00
deads2k a87d927588 update client.Config to use GroupVersion 2015-11-21 08:29:26 -05:00
Kris 9b75b88d4e Move client's tranport to a separate package 2015-11-19 14:55:47 -08:00
Chao Xu 15e6ca5ac5 rename to GroupVersion and rename the one in type.go to GroupVersionForDiscovery 2015-11-05 14:52:58 -08:00
Chao Xu 7817c2312c fix rebase 2015-10-12 13:48:14 -07:00
Chao Xu 6a4c477af7 add a ServerAPIVersions function that visits both /api and /apis, and doesn't require a high-level client 2015-10-01 15:00:33 -07:00
Chao Xu ac5481d089 move client/unversioned/fake.go to its own package 2015-09-11 17:33:54 -07:00
Chao Xu 64bf839e9f refactor tests to use testapi rather than latest directly 2015-09-11 17:32:23 -07:00
Chao Xu dd6c121d7f massive changes 2015-09-11 17:31:47 -07:00
Chao Xu 9fc79e9d99 refactor testapi and test scripts to prepare for multiple API groups. 2015-09-04 18:01:32 -07:00
Kris Rousey 7ba5b058cc Moving client libs to unversioned dir 2015-08-18 10:03:19 -07:00