clientv3: Fix inconsistent naming convention in v3 client.

In order to have a consistent naming for variable/function names
pertaining to ModifiedRevision, all occurrences have been renamed
to ModRevision.
This commit is contained in:
Ajit Yagaty
2016-03-22 14:58:11 -07:00
parent e73ac5bdd7
commit 606889a002
10 changed files with 12 additions and 12 deletions

View File

@@ -31,7 +31,7 @@ var (
// deleteRevKey deletes a key by revision, returning false if key is missing
func deleteRevKey(kv v3.KV, key string, rev int64) (bool, error) {
cmp := v3.Compare(v3.ModifiedRevision(key), "=", rev)
cmp := v3.Compare(v3.ModRevision(key), "=", rev)
req := v3.OpDelete(key)
txnresp, err := kv.Txn(context.TODO()).If(cmp).Then(req).Commit()
if err != nil {

View File

@@ -123,7 +123,7 @@ func newSequentialKV(kv v3.KV, prefix, val string, leaseID v3.LeaseID) (*RemoteK
baseKey := "__" + prefix
// current revision might contain modification so +1
cmp := v3.Compare(v3.ModifiedRevision(baseKey), "<", resp.Header.Revision+1)
cmp := v3.Compare(v3.ModRevision(baseKey), "<", resp.Header.Revision+1)
reqPrefix := v3.OpPut(baseKey, "", v3.WithLease(leaseID))
reqNewKey := v3.OpPut(newKey, val, v3.WithLease(leaseID))