Class: Nsq::ClientBase
- Inherits:
-
Object
- Object
- Nsq::ClientBase
- Includes:
- AttributeLogger
- Defined in:
- lib/nsq/client_base.rb
Constant Summary collapse
- @@log_attributes =
[:topic]
Instance Attribute Summary collapse
-
#connections ⇒ Object
readonly
Returns the value of attribute connections.
-
#topic ⇒ Object
readonly
Returns the value of attribute topic.
Instance Method Summary collapse
Methods included from AttributeLogger
Instance Attribute Details
#connections ⇒ Object (readonly)
Returns the value of attribute connections.
11 12 13 |
# File 'lib/nsq/client_base.rb', line 11 def connections @connections end |
#topic ⇒ Object (readonly)
Returns the value of attribute topic.
10 11 12 |
# File 'lib/nsq/client_base.rb', line 10 def topic @topic end |
Instance Method Details
#connected? ⇒ Boolean
13 14 15 |
# File 'lib/nsq/client_base.rb', line 13 def connected? @connections.values.any?(&:connected?) end |
#terminate ⇒ Object
18 19 20 21 |
# File 'lib/nsq/client_base.rb', line 18 def terminate @discovery_thread.kill if @discovery_thread drop_all_connections end |