Skip to content

Instantly share code, notes, and snippets.

@gjohnson
Created February 9, 2014 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gjohnson/8906579 to your computer and use it in GitHub Desktop.
Save gjohnson/8906579 to your computer and use it in GitHub Desktop.
etcd + co
var etcd = require('..');
var co = require('co');
co(function *() {
try {
var leader = yield etcd.leader();
console.log(leader);
} catch (err) {
console.error(err);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment