Class: KafkaSyrup::Protocol::MetadataResponse::Broker
- Inherits:
-
Struct
- Object
- Struct
- KafkaSyrup::Protocol::MetadataResponse::Broker
- Defined in:
- lib/kafka_syrup/protocol/metadata_response.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
Returns the value of attribute host.
-
#node ⇒ Object
Returns the value of attribute node.
-
#port ⇒ Object
Returns the value of attribute port.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#host ⇒ Object
Returns the value of attribute host
40 41 42 |
# File 'lib/kafka_syrup/protocol/metadata_response.rb', line 40 def host @host end |
#node ⇒ Object
Returns the value of attribute node
40 41 42 |
# File 'lib/kafka_syrup/protocol/metadata_response.rb', line 40 def node @node end |
#port ⇒ Object
Returns the value of attribute port
40 41 42 |
# File 'lib/kafka_syrup/protocol/metadata_response.rb', line 40 def port @port end |
Class Method Details
.decode(io) ⇒ Object
49 50 51 52 53 54 55 |
# File 'lib/kafka_syrup/protocol/metadata_response.rb', line 49 def self.decode(io) new( E.read_int32(io), # Node E.read_string(io), # Host E.read_int32(io) # Port ) end |
Instance Method Details
#encode ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/kafka_syrup/protocol/metadata_response.rb', line 41 def encode [ E.write_int32(node), E.write_string(host), E.write_int32(port) ].join end |