Skip to content

Latest commit

 

History

History
42 lines (26 loc) · 590 Bytes

README.md

File metadata and controls

42 lines (26 loc) · 590 Bytes

A etcd client for nodejs (grpc api)

Getting Started

# install google-protobuf package

git clone https://github.com/google/protobuf.git

cd protobuf/js

gulp dist

npm install /path/to/protobuf/js

#Usage

var Etcd = require('etcd-clientv3');

var etcd = new Etcd(['localhost:2379','localhost:22379','localhost:32379']);

//kv
etcd.kv().one('foo',function(err,value){
    //...
});

//watcher
var watcher = etcd.watcher().create('foo','foo2');
watcher.on('error',function(err){
    //...
});

watcher.on('events',function(events){
    //...
});