1.0.6 • Published 9 years ago

consulr v1.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

consulr

Build Status Coverage Status npm version NPM

Decode Consul data into Nodejs and watch for updates

Consul is a tool for service discovery, monitoring and configuration. https://www.consul.io/

Install npm package

npm i consulr --save

Preview

const Consulr = require('consulr');

function main() {
  const c = new Consulr({
    prefix: "foo/",
    quiescencePeriodInMs: 3 * 1000 // 3 sec
  });

  c.on('update', newValue => {
    console.log(`New value : ${JSON.stringify(newValue)}`);
  });
  
  c.on('error', err => {
    console.log(`Error value : ${JSON.stringify(err)}`);
  });
  
  c.run();
}

main();

Development

It uses yarn for dependency management.

git clone git@github.com:ziyasal/consulr.git
cd consulr
yarn #it will install dependencies

Testing
It uses nock to intercept consul http calls in tests.

##Bugs If you encounter a bug, performance issue, or malfunction, please add an Issue with steps on how to reproduce the problem.

##License Code and documentation are available according to the MIT License (see LICENSE).

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago