10 Commits

Author SHA1 Message Date
Anthony Romano
eb327c690b clientv3: support watcher ranges 2016-02-29 15:20:41 -08:00
Anthony Romano
d02b1c982f clientv3: return closed channel on Watch() cancel
was returning nil; difficult to use correctly

Fixes #4626
2016-02-26 12:16:41 -08:00
Gyu-Ho Lee
a78604dacb *: watch true cancel, created for wrong rev
This sets Created and Cancel true in pb.WatchResponse
when it has received wrong start revision instead of
panic. So that clientv3 can set 'Canceled' in WatchResponse
as well.

Fix https://github.com/coreos/etcd/issues/4610.
2016-02-24 20:56:17 -08:00
Gyu-Ho Lee
a24d276891 clientv3: combine Watch, WatchPrefix with variadic
For https://github.com/coreos/etcd/issues/4598.
2016-02-23 20:02:21 -08:00
Anthony Romano
f66162932c clientv3: fix current watcher reconnection
If a current watcher didn't receive any events, a reconnect cycle would
advance its revision to the store's current revision. Instead, reconnect
using the watcher's creation header revision if the watcher hasn't received
any events.

Fixes #4502
2016-02-18 15:01:57 -08:00
Anthony Romano
2415303991 clientv3: typedef <-chan WatchResponse to WatchChan 2016-02-12 14:06:59 -08:00
Anthony Romano
3b7bd38a2d clientv3: fix bad variable capture in watch request retry
variables would be niled out when the goroutine runs, causing a crash
2016-02-11 13:35:07 -08:00
Anthony Romano
3c9e8540a7 clientv3: optionize put and delete 2016-02-10 15:03:11 -08:00
Anthony Romano
51c4894f62 clientv3: ctx-ize KV 2016-02-09 17:42:34 -08:00
Anthony Romano
580c563ed6 clientv3: watcher implementation 2016-02-01 23:21:55 -08:00