Skip to content

Commit

Permalink
Migration to the new Etcd client
Browse files Browse the repository at this point in the history
This commit migrates the old 'go-etcd' client, which is deprecated
to the new 'coreos/etcd/client'.

One notable change is the ability to specify an 'IsDir' parameter
to the 'Put' call. This allows to circumvent the limitations of etcd
regarding the key/directory distinction while setting up Watches on
a directory. A conservative measure to set up a watch that should be
used the same way for etcd/consul/zookeeper is to enforce the 'IsDir'
parameter with 'WriteOptions' on 'Put' to avoid the 'NotANode' error
thrown by etcd on Watch call. Consul and zookeeper are not using the
'IsDir' parameter.

Signed-off-by: Alexandre Beslic <abronan@docker.com>
  • Loading branch information
abronan committed Oct 5, 2015
1 parent 975dbc9 commit d635a8e
Show file tree
Hide file tree
Showing 3 changed files with 221 additions and 186 deletions.
Loading

0 comments on commit d635a8e

Please sign in to comment.