discover-client
v0.1.3
Published
NodeJS client for Discover, a Docker service discovery provider
Downloads
11
Maintainers
Readme
Discover: Docker Service Discovery Client for Node.JS
This is a NodeJS client library for quick lookup of services published by Discover.
Installation
npm install --save discover-client
Quick Start
var Discover = require('discover-client'),
discover = new Discover({ host: 'etcd.domain.com', port: 4001, prefix: 'discover' });
var service = discover.resolve('my-service-name');
service.uri(); // returns URI for a random instance who provides the given service
service.list(); // returns all URI's for instances providing the given service