Browse Source

client: rename KeysAPI.RecursiveWatch to RWatch

Brian Waldon 11 years ago
parent
commit
6d89e6217d
3 changed files with 5 additions and 5 deletions
  1. 2 2
      client/keys.go
  2. 1 1
      discovery/discovery.go
  3. 2 2
      discovery/discovery_test.go

+ 2 - 2
client/keys.go

@@ -67,7 +67,7 @@ type KeysAPI interface {
 	Get(ctx context.Context, key string) (*Response, error)
 
 	Watch(key string, idx uint64) Watcher
-	RecursiveWatch(key string, idx uint64) Watcher
+	RWatch(key string, idx uint64) Watcher
 }
 
 type SetOptions struct {
@@ -166,7 +166,7 @@ func (k *httpKeysAPI) Watch(key string, idx uint64) Watcher {
 	}
 }
 
-func (k *httpKeysAPI) RecursiveWatch(key string, idx uint64) Watcher {
+func (k *httpKeysAPI) RWatch(key string, idx uint64) Watcher {
 	return &httpWatcher{
 		client: k.client,
 		nextWait: waitAction{

+ 1 - 1
discovery/discovery.go

@@ -275,7 +275,7 @@ func (d *discovery) waitNodes(nodes client.Nodes, size int, index uint64) (clien
 		nodes = nodes[:size]
 	}
 	// watch from the next index
-	w := d.c.RecursiveWatch(d.cluster, index+1)
+	w := d.c.RWatch(d.cluster, index+1)
 	all := make(client.Nodes, len(nodes))
 	copy(all, nodes)
 	for _, n := range all {

+ 2 - 2
discovery/discovery_test.go

@@ -435,7 +435,7 @@ func (c *clientWithResp) Watch(key string, waitIndex uint64) client.Watcher {
 	return c.w
 }
 
-func (c *clientWithResp) RecursiveWatch(key string, waitIndex uint64) client.Watcher {
+func (c *clientWithResp) RWatch(key string, waitIndex uint64) client.Watcher {
 	return c.w
 }
 
@@ -457,7 +457,7 @@ func (c *clientWithErr) Watch(key string, waitIndex uint64) client.Watcher {
 	return c.w
 }
 
-func (c *clientWithErr) RecursiveWatch(key string, waitIndex uint64) client.Watcher {
+func (c *clientWithErr) RWatch(key string, waitIndex uint64) client.Watcher {
 	return c.w
 }