Преглед на файлове

grpcproxy: forward PrevKv flag in Put

Anthony Romano преди 8 години
родител
ревизия
be8f102efb
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  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 {
 	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...)
 }
 }