mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
client: rename KeysAPI.RecursiveWatch to RWatch
This commit is contained in:
parent
4e5c015fe9
commit
6d89e6217d
@ -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{
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user