Commit Graph

10 Commits (411696d5ef72b8d0b0e87586815dcc1046293ce3)

Author SHA1 Message Date
Clayton Coleman c6961d6fd6
Remove runtime.Typer, reduce to ObjectKinds(1) (3)
Remove the unnecessary variants, which avoids allocations in several
core paths.
2016-05-21 23:55:42 -04:00
Clayton Coleman 6685715c4c
API for adding init containers 2016-05-17 00:29:49 -04:00
Clayton Coleman 9ebfa1db2f
Add a proto full decode benchmark 2016-05-07 11:55:31 -04: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
Clayton Coleman 4ad5565c41
RecognizingDecoder didn't handle ambiguous input
YAML is not guaranteed to be recognizable, so we need to bump JSON and
protobuf above it in the decoding order. Add a unit test.
2016-05-05 12:08:22 -04:00
Clayton Coleman cea4c010a6 Strip the proto build guard 2016-04-20 12:12:29 -04:00
Clayton Coleman 3474911736 Implement a streaming serializer for watch
Changeover watch to use streaming serialization. Properly version the
watch objects. Implement simple framing for JSON and Protobuf (but not
YAML).
2016-04-11 11:22:05 -04:00
Clayton Coleman f2139b186c Add an experimental protobuf serializer
Provide a core protobuf serializer that can either write objects with
an envelope (a 4 byte prefix and a runtime.Object) or raw to a byte
array.
2016-03-31 10:41:11 -04:00
harry b0900bf0d4 Refactor diff into sub pkg 2016-03-21 20:21:39 +08:00
Clayton Coleman 9fea762917 Add protobuf preparation objects, guarded by proto tag 2015-12-05 18:15:48 -05:00