From 93795745b08ccc21d9c695d9a68672d4c22566d1 Mon Sep 17 00:00:00 2001 From: Hongchao Deng Date: Thu, 18 Feb 2016 13:56:37 -0800 Subject: [PATCH] storage: add watch event docs for create case --- storage/storagepb/kv.pb.go | 6 +++--- storage/storagepb/kv.proto | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/storage/storagepb/kv.pb.go b/storage/storagepb/kv.pb.go index 92835c6c5..b293db81a 100644 --- a/storage/storagepb/kv.pb.go +++ b/storage/storagepb/kv.pb.go @@ -74,9 +74,9 @@ func (*KeyValue) ProtoMessage() {} type Event struct { Type Event_EventType `protobuf:"varint,1,opt,name=type,proto3,enum=storagepb.Event_EventType" json:"type,omitempty"` - // a put event contains the current key-value - // a delete/expire event contains the previous - // key-value + // A PUT event contains current kv pair. + // A PUT event with kv.Version=1 indicates the creation of a key. + // A DELETE/EXPIRE event contains previous kv pair Kv *KeyValue `protobuf:"bytes,2,opt,name=kv" json:"kv,omitempty"` } diff --git a/storage/storagepb/kv.proto b/storage/storagepb/kv.proto index ba8820542..6ccde1d06 100644 --- a/storage/storagepb/kv.proto +++ b/storage/storagepb/kv.proto @@ -32,8 +32,8 @@ message Event { EXPIRE = 2; } EventType type = 1; - // a put event contains the current key-value - // a delete/expire event contains the previous - // key-value + // A PUT event contains current kv pair. + // A PUT event with kv.Version=1 indicates the creation of a key. + // A DELETE/EXPIRE event contains previous kv pair KeyValue kv = 2; }