etcd-team/etcd — pull request #18 by xiangli-cmu (2014-08-03 16:44:43+00:00)
Title: etcd: make cmd a protobuf type

@unihorn @bmizerany
V2 store does not support binary value. I am not going to change this for now, so value is still a string type.

message cmd {
required int32 type = 1 [(gogoproto.nullable) = false];
required string key = 2 [(gogoproto.nullable) = false];
optional string value = 3;
optional string prevValue = 4;
optional uint64 prevIndex = 5;
optional bool dir = 6;
optional bool recursive = 7;
optional bool unique = 8;
optional bytes time = 9;
}

We need to manually encode/decode time to/from bytes, since protobuf does not support go time type.