Socket
Book a DemoInstallSign in
Socket

nsq-lookup

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nsq-lookup

lookup nsqd instances via nsqlookupd

latest
Source
npmnpm
Version
3.0.0
Version published
Maintainers
2
Created
Source

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

Keywords

nsq

FAQs

Package last updated on 28 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts