Commit Graph

26 Commits (262de75a7ec6a224333337ad54a9671483ebbcaa)

Author SHA1 Message Date
Gyu-Ho Lee 2e3d79a7bf clientv3: convert errors to rpctypes on returning
For https://github.com/coreos/etcd/issues/5211.
2016-04-28 15:39:37 -07:00
Anthony Romano b7ac758969 *: rename storage package to mvcc 2016-04-25 15:25:51 -07:00
Hongchao Deng aa11dafaf8 clientv3: expose event type in user API
- add another layer of abstraction in clientv3 for user, not expose internal storagepb ones
- provide commonly used routines IsCreate(), IsModify() on event
2016-04-07 09:47:04 -07:00
Gyu-Ho Lee b0cc0e443c *: clean up if, bool comparison 2016-04-02 12:55:11 -07:00
Anthony Romano 4bdfc0a46d clientv3: fix race on writing watch channel over return channel
Found in TestElectionFailover
2016-03-28 16:08:18 -07:00
Anthony Romano e129223dbe clientv3: fix race in watcher resume 2016-03-28 16:08:18 -07:00
Anthony Romano bd832e5b0a *: migrate Godeps to vendor/ 2016-03-22 17:10:28 -07:00
Anthony Romano 44753594ec v3rpc: move errors to v3rpc/rpctypes
Fixes #4771
2016-03-17 11:52:34 -07:00
Xiang Li e708bc14d7 Merge pull request #4689 from hongchaodeng/master
watch.go: docs on WatchResponse.Canceled
2016-03-04 16:09:16 -08:00
Hongchao Deng 5e017e94f9 watch.go: docs on WatchResponse.Canceled 2016-03-04 15:51:00 -08:00
Gyu-Ho Lee 450b586011 clientv3: add IsProgressNotify with example
This makes the test endpoints same as we have in
goreman proc file, and adds 'IsProgressNotify' method
and the 'WatchProgressNotify' code example to godoc.
2016-03-04 12:16:43 -08:00
Gyu-Ho Lee 27316196d8 clientv3: add WithProgressNotify
Client side for https://github.com/coreos/etcd/issues/4628.
2016-03-04 09:47:13 -08:00
Anthony Romano 1e16758029 clientv3: add Err() to WatchResponse
Checking for number of events as a failure condition was a kludge.
2016-03-03 15:21:04 -08:00
Anthony Romano 16c35167df clientv3: do not reconnect on request context cancellation 2016-03-03 13:43:16 -08:00
Anthony Romano 8dbc6cfd43 etcdserver: ranges in watcher rpc protocol
protocol change so watch requests are ranges; server rejects non-prefix ranges
2016-02-29 14:03:27 -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 8f7948641c contrib/recipes: replace WatchPrefix with Watch 2016-02-23 20:02:24 -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 8e411b1b3b clientv3: send compacted revision before closing watch chan 2016-02-12 14:06:59 -08:00
Anthony Romano ee1a03167d storage, v3: pass compaction revision through watchresponse 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 580c563ed6 clientv3: watcher implementation 2016-02-01 23:21:55 -08:00
Xiang Li 205ffa5cb6 clientv3: initial watch API 2016-01-28 08:54:32 -08:00