etcdx

etcd v2 client for node.js

etcdx

node client for etcd v2 that adheres to waitIndex for watching.

var etcdx = require('etcdx');
var client = new etcdx();
 
client.watch('/mongo_servers', true, function(errorserver){
    // server is 'hello' then 'hello2' 
})
 
client.set('/mongo_servers/server1', 'hello');
client.set('/mongo_servers/server1', 'hello2');
$ npm install etcdx

set the following options for further requests to the etcd server:

  • protocol
  • host
  • port
  • version

run 'trigger' each time a value at or below 'key' changes

'recursive' controls how deep we are watching

this function looks at the global etcd waitIndex in case a value has changed in-between our watch requests

return the value of 'key'

set the value of 'key'

set the value of 'key' for 'ttl' seconds

remove 'key'

list the entries below 'key' - recursive follows nested directories

create a directory (with no value) at 'key'

remove all values below key

MIT