Class: TopologicalInventory::Providers::Common::MessagingClient
- Inherits:
-
Object
- Object
- TopologicalInventory::Providers::Common::MessagingClient
- Defined in:
- lib/topological_inventory/providers/common/messaging_client.rb
Instance Attribute Summary collapse
-
#queue_host ⇒ Object
Kafka host name.
-
#queue_port ⇒ Object
Kafka port.
Class Method Summary collapse
Instance Method Summary collapse
- #client ⇒ Object
-
#initialize ⇒ MessagingClient
constructor
A new instance of MessagingClient.
Constructor Details
#initialize ⇒ MessagingClient
Returns a new instance of MessagingClient.
14 15 16 17 |
# File 'lib/topological_inventory/providers/common/messaging_client.rb', line 14 def initialize self.queue_host = TopologicalInventory::Providers::Common::ClowderConfig.instance["kafkaHost"] self.queue_port = TopologicalInventory::Providers::Common::ClowderConfig.instance["kafkaPort"].to_i end |
Instance Attribute Details
#queue_host ⇒ Object
Kafka host name
10 11 12 |
# File 'lib/topological_inventory/providers/common/messaging_client.rb', line 10 def queue_host @queue_host end |
#queue_port ⇒ Object
Kafka port
12 13 14 |
# File 'lib/topological_inventory/providers/common/messaging_client.rb', line 12 def queue_port @queue_port end |
Class Method Details
.configure ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/topological_inventory/providers/common/messaging_client.rb', line 23 def self.configure if block_given? yield(default) else default end end |
.default ⇒ Object
19 20 21 |
# File 'lib/topological_inventory/providers/common/messaging_client.rb', line 19 def self.default @@default ||= new end |
Instance Method Details
#client ⇒ Object
35 36 37 |
# File 'lib/topological_inventory/providers/common/messaging_client.rb', line 35 def client self.class.client end |