Commit Graph

86 Commits (c8cc87c3f5527c386bba2ad4a27da757f812664c)

Author SHA1 Message Date
Gyu-Ho Lee ef44f71da9 *: update LICENSE header 2016-05-12 20:51:48 -07:00
Anthony Romano bd832e5b0a *: migrate Godeps to vendor/ 2016-03-22 17:10:28 -07:00
Caleb Champlin 82778ed478 Add refresh parameter to allow TTL refreshes without firing watch/wait responses 2016-02-08 10:37:37 -07:00
Anthony Romano 20461ab11a *: fix many typos 2016-01-31 21:42:39 -08:00
Xiang Li 9776e6d082 store: fix modifiedindex in node clone 2015-02-05 22:26:52 -08:00
Yicheng Qin 3ac0298bd0 store: set readonly to pre-defined namespaces 2015-02-04 16:47:08 -08:00
Yicheng Qin f13c7872d5 etcdserver: register pre-defined namespaces in store 2015-02-04 16:33:40 -08:00
Jonathan Boulle f1ed69e883 *: switch to line comments for copyright
Build tags are not compatible with block comments.
Also adds copyright header to a few places it was missing.
2015-01-26 09:53:30 -08:00
Jonathan Boulle 7a4d42166b *: add license header to all source files 2014-10-17 15:41:22 -07:00
Jonathan Boulle 1456ae4453 store: restore minExpireTime check and advance FakeClock appropriately 2014-10-17 10:05:29 -07:00
Jonathan Boulle e0801360d3 godep: update clockwork dependency 2014-10-17 10:05:29 -07:00
Jonathan Boulle 3134658ded store: switch to fake clock 2014-10-17 10:05:29 -07:00
Jonathan Boulle 4183b69e12 *: move from third_party to Godep 2014-10-14 00:37:52 -07:00
Jonathan Boulle 1c11f6a144 *: expose etcd-index in watch requests
This adds a StartIndex field to the Watcher interface, which represents
the Etcd-Index at which the Watcher is created.

Also refactors the HTTP tests to use a table for most handleWatch tests
2014-10-02 18:10:11 -07:00
Jonathan Boulle f27b4cbbce store: add etcd-index tests 2014-09-24 15:04:32 -07:00
Jonathan Boulle f7444ff300 store: convert Watch to interface 2014-09-09 11:17:53 -07:00
Yicheng Qin cc1df691cc store: fix the bug caused by random iteration order over map 2014-09-03 09:20:08 -07:00
Sam Ghods 3ae0a1e1a6 fix(store.go) include node.dir = true when updating a directory's ttl, fixes coreos/etcd#736 2014-04-17 15:15:41 -07:00
Brandon Philips 8485987b74 Merge pull request #524 from yifan-gu/remove_omitempty_on_value
remove omitempty on value
2014-02-18 07:08:00 -08:00
evan-gu 9cfd8c5f0b fix(store): make NodeExtern.Value a *string
Before this change if the value of a Node was "" it would get dropped from the json
encoding and the Node.Value field would be missing. Fix this problem by making
NodeExtern.Value a *string so that an empty string will be encoded but a nil value
will drop the field.
2014-02-18 00:50:44 -05:00
Cenk Alti e73e61f238 test(store/watch): add test case for slow event consumers 2014-02-14 16:12:53 -08:00
Brandon Philips 2a2714a4bf Merge pull request #514 from cenkalti/prevNode
feat(prevNode): add "prevNode" to "Set" response
2014-02-07 12:04:18 -08:00
Xiang Li 1b5f9eb013 test (isHidden) add unit test for isHidden function 2014-02-05 23:32:12 -05:00
Xiang Li ba98de6ef0 fix(watch hidden key) Fix hidden keys preventing deeper recursive watches from receiving events
If a watcher has given the correct hidden directory, we should allow it to watch the non-hidden events under that hidden directory. This pull request achieves this by checking if the path after the watching prefix has a "/_" which indicates a hidden key.
2014-02-05 22:34:41 -05:00
Brandon Philips d7d20d1c3d bump(github.com/stretchr/testify): 9cc77fa25329013ce07362c7742952ff887361f2 2014-02-02 16:57:36 -08:00
Cenk Alti 354a91290e feat(prevNode): add test for prevNode 2014-01-29 17:52:25 -08:00
Brandon Philips 1b00c449a5 Revert "Better error message when setting values on directories"
This reverts commit d13dd50d51.
2014-01-23 11:22:11 -08:00
Kelsey Hightower d13dd50d51 Better error message when setting values on directories
Without this commit etcd returns the following error message when
setting values on directories:

    {
      "errorCode":102,
      "message":"Not a file",
      "cause":"/postgres",
      "index":2
    }

While the above error message is accurate it's not very descriptive.
This commit adds a new error code/message which better describes why the
write operation failed. etcd now returns the following:

    {
      "errorCode":109,
      "message":"Cannot set value on directory",
      "cause":"/postgres",
      "index":2
    }
2014-01-22 23:02:33 -08:00
tobz 641edd4e6e test(store): group together all store tests that deal with hidden keys 2014-01-22 09:29:53 -05:00
tobz 0cacb6cba4 test(store): exercise watchers receiving notifications of non-hidden keys within hidden directories 2014-01-22 09:20:57 -05:00
tobz 7a948746a8 fix(store): move logic to handle whether or not to notify (re: hidden keys) entirely into watcher hub 2014-01-22 09:02:42 -05:00
tobz 139f59f7d1 fix(store): properly hide hidden keys from watchers, not just gets 2014-01-21 20:26:56 -05:00
Xiang Li 22a25a18b3 feat(stream watchers) add stream watcher support 2014-01-09 15:28:33 +08:00
Xiang Li 2bfb8f5e4f Merge pull request #418 from xiangli-cmu/cancel_watcher
cancel watcher
2014-01-08 21:34:32 -08:00
Xiang Li fa3b4a7941 refactor(watcher) change newWatcher to Watch 2014-01-09 13:29:04 +08:00
Xiang Li 189b98c03f refactor(node_extern.go) remove unused prevValue field 2014-01-01 20:01:29 +08:00
Xiang Li f46fdbf078 feat(node_extern.go) add prevNode field 2014-01-01 19:50:07 +08:00
Xiang Li 5e499456f0 init cancel watcher 2013-12-26 22:06:15 +08:00
Xiang Li 9cf1fcc987 refactor(compareAndDelete) 2013-12-20 05:10:22 +08:00
Xiang Li e2fa89d554 merge compareAndDelete 2013-12-19 22:19:49 +08:00
Xiang Li 59e98fcc62 doc fix grammar issue 2013-12-09 11:33:55 -05:00
Xiang Li d646d7c16a tests add tests for dir flag 2013-12-05 20:46:52 -05:00
Xiang Li e00296960c test fix tests 2013-12-05 18:16:01 -05:00
Xiang Li b556252358 tests fix all tests 2013-12-05 17:48:32 -05:00
Xiang Li c6e1af8321 merge master 2013-12-02 22:36:38 -05:00
Xiang Li b929e71948 tests add root readonly test 2013-12-01 18:16:32 -05:00
rick d2d7e37990 implement recursive for CompareAndDelete in the store 2013-12-01 13:38:09 -07:00
rick f8985d731f keep the Delete tests together 2013-12-01 13:28:14 -07:00
rick 90a8f56c96 add compareAndDelete event action 2013-11-30 10:08:25 -07:00
rick 702cf1cc36 teach store.Store about CompareAndDelete 2013-11-30 10:02:03 -07:00