grpcproxy: respect prev_kv flag

This commit is contained in:
Anthony Romano 2016-07-20 15:52:31 -07:00
parent becbd9f3d6
commit 768ccb8c10

View File

@ -151,6 +151,8 @@ func DelRequestToOp(r *pb.DeleteRangeRequest) clientv3.Op {
if len(r.RangeEnd) != 0 {
opts = append(opts, clientv3.WithRange(string(r.RangeEnd)))
}
if r.PrevKv {
opts = append(opts, clientv3.WithPrevKV())
}
return clientv3.OpDelete(string(r.Key), opts...)
}