Commit Graph

24 Commits (a6a3ed210c982ddbf1c61c7c2e7225d509af7f61)

Author SHA1 Message Date
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
goltermann 696423e044 Vet fixes, mostly pass lock by value errors. 2016-04-06 11:27:40 -07:00
goltermann 32d569d6c7 Fixing all the "composite literal uses unkeyed fields" Vet errors. 2016-03-25 15:25:09 -07:00
goltermann 34d4eaea08 Fixing several (but not all) go vet errors. Most are around string formatting, or unreachable code. 2016-03-22 17:26:50 -07:00
deads2k 9901a386c3 remove ResourceIsValid 2016-02-15 07:49:48 -05:00
Clayton Coleman 181dc7c64c Update thirdpartyresourcecodec with new Decoder 2016-01-22 13:27:25 -05:00
deads2k 20f9c2c545 find partial resource matches 2015-12-21 09:26:06 -05:00
Abhishek Shah 6f63875165 Reverting 18442 2015-12-17 16:57:29 -08:00
deads2k 41b78ad2b6 find partial resource matches 2015-12-16 10:19:31 -05: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
k8s-merge-robot c458cd7bb7 Merge pull request #18379 from deads2k/gv-newobject
Auto commit by PR queue bot
2015-12-13 13:33:16 -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
Brendan Burns 9574a4b782 Switch to KindToResource for ThirdPartyResourceData 2015-12-07 12:54:41 -08:00
Chao Xu 7c9f4cc42f experimental. -> extensions. 2015-10-09 15:49:10 -07:00
Chao Xu 67f316dd19 apis/experimental->apis/extensions 2015-10-09 15:04:41 -07:00
Chao Xu f4ff0f7683 fix thirdparty API, now the config file of thirdpartyresource also need to group/version instead of version 2015-10-01 12:30:51 -07:00
Chao Xu f1de364a0e Make latest.AllGroups public; fix thirdPartyResourceDataCreator.New 2015-09-21 22:32:24 -07:00
Daniel Martí 586cb9126a Move pkg/util.Time to pkg/api/unversioned.Time
Along with our time.Duration wrapper, as suggested by @lavalamp.
2015-09-17 17:51:27 -07:00
Kris f4ad00d9ae Moving Status object to a common package 2015-09-17 14:09:53 -07:00
feihujiang 51f59f3c78 Fix the wrong path of document 2015-09-17 20:38:08 +08:00
Daniel Smith 4c2adabf42 move; sed replace 2015-09-11 16:03:22 -07:00
Brendan Burns 61f272c8cd Update the third party data codec to automatically include everything
in api.ObjectMeta.  Add more tests.
2015-09-08 21:13:06 -07:00
Brendan Burns 6aa7ce2689 addressed comments. 2015-09-01 12:00:56 -07:00