etcd-node
An alternative client library for interacting with etcd from node.js (without coffeescrpt). If you don't mind having coffeescript dependencies, there is already is a module for that.
Notice
This is not stable at all! I am writing this module as I learn more about etcd, feel free to help!
Install
$ npm install etcd
Configuring.
I made the client a singleton for the time being (up for suggestions). If you need to set host
or port
, use the configure
method.
var etcd = ; etcd;
NOTE: I still need to add SSL support.
Commands
I am still implementing commands, but here is what we have so far:
.set(string, mixed, [options], [callback])
etcd;
Set with a TTL:
etcd;
Set using a "setAndTest":
etcd;
.get(string, [callback])
etcd;
.del(string, [callback])
etcd;
.list(string, [callback])
etcd;
.watch(string, [callback])
etcd;
.machines(callback)
etcd;
.leader(callback)
etcd;
TODO
- encoding (json|string)
License
MIT