Class: Kafka::BrokerInfo
- Inherits:
-
Object
- Object
- Kafka::BrokerInfo
- Defined in:
- lib/kafka/broker_info.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#node_id ⇒ Object
readonly
Returns the value of attribute node_id.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Instance Method Summary collapse
-
#initialize(node_id:, host:, port:) ⇒ BrokerInfo
constructor
A new instance of BrokerInfo.
- #to_s ⇒ Object
Constructor Details
permalink #initialize(node_id:, host:, port:) ⇒ BrokerInfo
Returns a new instance of BrokerInfo.
6 7 8 9 10 |
# File 'lib/kafka/broker_info.rb', line 6 def initialize(node_id:, host:, port:) @node_id = node_id @host = host @port = port end |
Instance Attribute Details
permalink #host ⇒ Object (readonly)
Returns the value of attribute host.
4 5 6 |
# File 'lib/kafka/broker_info.rb', line 4 def host @host end |
permalink #node_id ⇒ Object (readonly)
Returns the value of attribute node_id.
4 5 6 |
# File 'lib/kafka/broker_info.rb', line 4 def node_id @node_id end |
permalink #port ⇒ Object (readonly)
Returns the value of attribute port.
4 5 6 |
# File 'lib/kafka/broker_info.rb', line 4 def port @port end |
Instance Method Details
permalink #to_s ⇒ Object
[View source]
12 13 14 |
# File 'lib/kafka/broker_info.rb', line 12 def to_s "#{host}:#{port} (node_id=#{node_id})" end |