Pārlūkot izejas kodu

grpcproxy: handle 'IgnoreLease' field in PutRequest

sharat 9 gadi atpakaļ
vecāks
revīzija
2fce80e4c0
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3 0
      proxy/grpcproxy/kv.go

+ 3 - 0
proxy/grpcproxy/kv.go

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