Clayton Coleman
60b66665e1
Move conversion.Scheme to runtime
...
There is only one type registry to rule them all
2016-01-30 14:12:40 -05:00
Clayton Coleman
33085c0cf2
Update tests to handle codec changes
2016-01-22 13:27:26 -05:00
Clayton Coleman
4d127dc969
Initialize API servers with negotiated serializers
...
Pass down into the server initialization the necessary interface for
handling client/server content type negotiation. Add integration tests
for the negotiation.
2016-01-22 01:10:22 -05:00
Clayton Coleman
c1d932e44a
Switch API objects to not register per version codecs
...
Remove Codec from versionInterfaces in meta (RESTMapper is now agnostic
to codec and serialization). Register api/latest.Codecs as the codec
factory and use latest.Codecs.LegacyCodec(version) as an equvialent to
the previous codec.
2016-01-22 01:10:21 -05:00
Clayton Coleman
6582b4c2ea
Remove codec awareness from conversion
...
Allow convertors to be specialized, some cleanup to how conversion
functions are stored internally to allow better reuse.
2016-01-21 23:18:32 -05:00
Clayton Coleman
3c1451af91
Use public conversion methods to avoid reflection
...
Replace many of the remaining s.Convert() invocations with direct
execution, and make generated methods public. Removes 10% of the
allocations during decode of a pod and ~20-40% of the total CPU time.
2015-12-29 10:38:42 -05:00
k8s-merge-robot
ac0ce7257b
Merge pull request #18702 from wojtek-t/remove_unversioned_selectors
...
Auto commit by PR queue bot
2015-12-23 09:51:53 -08:00
Wojciech Tyczynski
55747ec1ce
Eliminate rubbish logs in pkg/conversion test
2015-12-22 16:07:30 +01:00
Wojciech Tyczynski
4aa2121a8e
Remove dead code
2015-12-22 11:07:22 +01:00
k8s-merge-robot
e309583ff1
Merge pull request #18473 from smarterclayton/change_runtime_object
...
Auto commit by PR queue bot
2015-12-16 04:24:22 -08:00
Clayton Coleman
8f203a28f1
Change runtime.Object signature
2015-12-15 13:36:25 -05:00
deads2k
6e33403abf
update CodecFor for GroupVersion
2015-12-15 10:56:00 -05:00
Mike Danese
56bb8138bf
remove merge conflict comments
2015-12-14 07:57:52 -08:00
Filip Grzadkowski
4ef062c22f
Merge pull request #18476 from caesarxuchao/fix-query-convert
...
Fix queryparams convert
2015-12-14 13:22:27 +01:00
k8s-merge-robot
266ab4a796
Merge pull request #18487 from smarterclayton/guard_encode_decode
...
Auto commit by PR queue bot
2015-12-13 23:08:18 -08:00
Chao Xu
2eba8b7f1f
fix queryparams convertStruct
2015-12-13 13:53:28 -08:00
Clayton Coleman
1e21054134
Hide common codec methods under helpers
...
The pending codec -> conversion split changes the signature of
Encode and Decode to be more complicated. Create a stub helper
with the exact semantics of today and do the simple mechanical
refactor here to reduce the cost of that change.
2015-12-09 21:15:02 -05:00
deads2k
519b4e80d1
update NewObject for groupversionkind
2015-12-09 08:13:15 -05:00
deads2k
f764e0099c
Update ObjectTyper to GroupVersion
2015-12-07 08:35:05 -05:00
Clayton Coleman
a512d83a87
Skip SetVersionAndKind for ConvertToVersion to internal
2015-12-05 18:15:48 -05:00
deads2k
ed95a6d77f
update scheme to use GroupVersion
2015-11-25 12:15:48 -05:00
deads2k
e0b7f52633
hack up queryToObject to continue to work as it used to
2015-11-25 12:14:06 -05:00
deads2k
68b0572974
internal versions
2015-11-25 12:14:06 -05:00
deads2k
6231404682
update decoder to use GroupVersion
2015-11-25 12:14:06 -05:00
Wojciech Tyczynski
d7b098b0e9
Add DecodeParametersInto method to Codec.
2015-11-18 09:56:04 +01:00
feihujiang
eac8d6a997
Cleanup the content of deprecated V1beta1
2015-11-06 13:42:51 +08:00
Chao Xu
69932aecb0
Let discoveryClient use RESTClient;
...
Ignore 403 and 404 error when discovering server-supported group/version
2015-10-29 09:55:32 -07:00
Wojciech Tyczynski
f650abaafa
Use ugorji/go/codec for decoding jsons.
2015-10-16 10:12:08 +02:00
Chao Xu
f3caff2a79
testapi.Experimental -> testapi.Extensions
2015-10-09 15:15:35 -07:00
Chao Xu
347d53ff2e
v1alpa1->v1beta1
2015-10-09 15:06:28 -07:00
Chao Xu
0b7e3c7dd1
experimental/v1alpha1->extensions/v1beta1
2015-10-09 15:01:33 -07:00
Brendan Burns
8998219686
Add a method for encoding directly to a io.Writer and use it for HTTPx
2015-09-24 15:52:09 -07:00
k8s-merge-robot
6d2c2440e9
Merge pull request #14203 from caesarxuchao/encode-unversioned
...
Auto commit by PR queue bot
2015-09-21 18:59:32 -07:00
Chao Xu
ab5c1f6710
let encoder handle unversioned objects
...
address lavalamp's comments
address lavalamp's comments
address lavalamp's comments
add a TODO based on lavalamp's comment
add a TODO based on lavalamp's comment
2015-09-21 15:57:45 -07:00
Clayton Coleman
a02bcefa10
Allow []string to be converted to *int64
...
Not something we hit before
2015-09-21 12:02:03 -04:00
liguangbo
4df68f03a3
change iff to if and only if to improve annotation readability
2015-09-16 08:29:36 +00:00
kargakis
f9bca7bc7d
handle structs
2015-09-03 15:49:24 +02:00
kargakis
6c32e071f4
Dont output nil; test nil & omitempty
2015-09-03 15:32:19 +02:00
kargakis
edfaa480cf
queryparams: Handle pointer fields in structs
2015-09-03 13:45:31 +02:00
Piotr Szczesniak
eb01d49783
Merge pull request #12556 from uluyol/copynilinterface
...
Properly handle nil interfaces in DeepCopy.
2015-08-12 09:54:02 +02:00
Piotr Szczesniak
1df0267f4a
Merge pull request #12551 from eparis/underscore-to-dash
...
Update code and docs to use - in flag names instead of _
2015-08-12 07:16:31 +02:00
Muhammed Uluyol
bc8bc37282
Properly handle nil interfaces in DeepCopy.
...
Running reflect.ValueOf(X) where X is a nil interface will return
a zero Value. We cannot get the type (because no concrete type is
known) and cannot check if the Value is nil later on due to the way
reflect.Value works. So we should handle this case by immediately
returning nil. We cannot type-assert a nil interface to another
interface type (as no concrete type is assigned), so we must add
another check to see if the returned interface is nil.
2015-08-11 17:59:32 -07:00
Kris Rousey
565189f5b8
Correcting all go vet errors
2015-08-11 13:55:37 -07:00
Eric Paris
5aa495cdad
Update code to use - in flag names instead of _
2015-08-11 16:31:52 -04:00
Marek Grabowski
5f9cefc1d8
Merge pull request #12441 from vlajos/typofixes-vlajos-20150807
...
typofix - https://github.com/vlajos/misspell_fixer
2015-08-10 16:33:52 +02:00
Veres Lajos
9f77e49109
typofix - https://github.com/vlajos/misspell_fixer
2015-08-08 22:31:48 +01:00
Kris Rousey
6e64a63a84
Adding a way to decode to a specified version.
...
This is largely needed as a way to get a versioned client without
requiring everyone to switch to versioned types at once.
2015-08-07 14:16:24 -07:00
Mike Danese
8e33cbfa28
rewrite go imports
2015-08-05 17:30:03 -07:00
Alex Mohr
366b382901
Merge pull request #10200 from caesarxuchao/resthandler-validate-version
...
verify and default APIVersion in createHandler, verify APIVersion in UpdateResource
2015-08-04 13:09:31 -07:00
Chao Xu
664d20c572
Add DecodeIntoWithSpecifiedVersionKind() to Decoder interface.
...
The function validate/default the body with the passed in apiVersion and Kind.
It's called in createHandler and UpdateResource
2015-08-03 15:30:00 -07:00