Skip to content

jazzzz/etcd-watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

etcd-watcher, watch etcd key creation and subsequent changes

Install

You need node-etcd.

$ npm install node-etcd
$ npm install etcd-watcher

Usage

var Etcd = require('node-etcd');
var etcd = new Etcd();
var etcdWatcher = require('etcd-watcher');

var watcher = etcdWatcher.watcher(etcd, ['key1', 'key2']);
watcher.wait(function (err, values) {
    console.log('keys set', values);
    watcher.on('change', function (values) {
        console.log('key change', values);
    })
});

About

Watch etcd key creation and subsequent changes

Resources

Stars

Watchers

Forks

Packages

No packages published