grpcproxy: forward PrevKv flag in Put

This commit is contained in:
Anthony Romano 2017-08-03 21:38:20 -07:00 committed by Gyu-Ho Lee
parent 3003901447
commit be8f102efb

View File

@ -206,6 +206,9 @@ func PutRequestToOp(r *pb.PutRequest) clientv3.Op {
if r.IgnoreLease { if r.IgnoreLease {
opts = append(opts, clientv3.WithIgnoreLease()) opts = append(opts, clientv3.WithIgnoreLease())
} }
if r.PrevKv {
opts = append(opts, clientv3.WithPrevKV())
}
return clientv3.OpPut(string(r.Key), string(r.Value), opts...) return clientv3.OpPut(string(r.Key), string(r.Value), opts...)
} }