mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
grpcproxy: handle 'IgnoreValue' field in PutRequest
This commit is contained in:
parent
5dffa38fb2
commit
0f8060bede
@ -187,7 +187,9 @@ func RangeRequestToOp(r *pb.RangeRequest) clientv3.Op {
|
||||
func PutRequestToOp(r *pb.PutRequest) clientv3.Op {
|
||||
opts := []clientv3.OpOption{}
|
||||
opts = append(opts, clientv3.WithLease(clientv3.LeaseID(r.Lease)))
|
||||
|
||||
if r.IgnoreValue {
|
||||
opts = append(opts, clientv3.WithIgnoreValue())
|
||||
}
|
||||
return clientv3.OpPut(string(r.Key), string(r.Value), opts...)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user