Class: Kafka::Protocol::MetadataResponse::BrokerInfo
- Inherits:
-
Object
- Object
- Kafka::Protocol::MetadataResponse::BrokerInfo
- Defined in:
- lib/kafka/protocol/metadata_response.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
#initialize(node_id:, host:, port:) ⇒ BrokerInfo
Returns a new instance of BrokerInfo.
37 38 39 40 41 |
# File 'lib/kafka/protocol/metadata_response.rb', line 37 def initialize(node_id:, host:, port:) @node_id = node_id @host = host @port = port end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
35 36 37 |
# File 'lib/kafka/protocol/metadata_response.rb', line 35 def host @host end |
#node_id ⇒ Object (readonly)
Returns the value of attribute node_id.
35 36 37 |
# File 'lib/kafka/protocol/metadata_response.rb', line 35 def node_id @node_id end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
35 36 37 |
# File 'lib/kafka/protocol/metadata_response.rb', line 35 def port @port end |
Instance Method Details
#to_s ⇒ Object
43 44 45 |
# File 'lib/kafka/protocol/metadata_response.rb', line 43 def to_s "#{host}:#{port} (node_id=#{node_id})" end |