nsq-lookup-jc
v3.0.3
Published
lookup nsqd instances via nsqlookupd
Downloads
24
Readme
nsq-lookup
Lookup nsqd nodes via N nsqlookupd addresses.
Installation
$ npm install nsq-lookup
Example
var lookup = require('nsq-lookup');
var addrs = [
'http://0.0.0.0:4161',
'http://0.0.0.0:4162',
'http://0.0.0.0:4161',
];
var opts = {
timeout: 10000,
topic: 'foobar' // optionally filter nodes based on topic
};
lookup(addrs, opts, function(errors, nodes){
if (errors) {
console.error(errors)
} else {
console.log(nodes);
}
});
License
MIT