class Nsq::Discovery
- Nsq::Discovery
- Reference
- Object
Included Modules
Defined in:
nsq/discovery.crConstructors
-
.new(lookupds : Array(String) = Array(String))
lookupd addresses must be formatted like so: '
: '
Instance Method Summary
-
#nsqds
Returns an array of nsqds instances
-
#nsqds_for_topic(topic : String)
Returns an array of nsqds instances that have messages for that topic.
Instance methods inherited from module Nsq::AttributeLogger
debug(msg)
debug,
error(msg)
error,
fatal(msg)
fatal,
info(msg)
info,
warn(msg)
warn
Class methods inherited from module Nsq::AttributeLogger
included(klass)
included
Constructor Detail
lookupd addresses must be formatted like so: '
Instance Method Detail
def nsqds
#
Returns an array of nsqds instances
nsqd instances returned are strings in this format: '
discovery.nsqds
#=> ['127.0.0.1:4150', '127.0.0.1:4152']
If all nsqlookupd's are unreachable, raises Nsq::DiscoveryException
def nsqds_for_topic(topic : String)
#
Returns an array of nsqds instances that have messages for that topic.
nsqd instances returned are strings in this format: '
discovery.nsqds_for_topic('a-topic')
#=> ['127.0.0.1:4150', '127.0.0.1:4152']
If all nsqlookupd's are unreachable, raises Nsq::DiscoveryException