nsq-lookup

    3.0.0 • Public • Published

    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

    Install

    npm i nsq-lookup

    DownloadsWeekly Downloads

    658

    Version

    3.0.0

    License

    MIT

    Last publish

    Collaborators

    • segment-admin
    • tjholowaychuk