Explorar o código

grpcproxy: forward PrevKv flag in Put

Anthony Romano %!s(int64=8) %!d(string=hai) anos
pai
achega
be8f102efb
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      proxy/grpcproxy/kv.go

+ 3 - 0
proxy/grpcproxy/kv.go

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