Class: KafkaSyrup::Protocol::ProduceResponse::Partition
- Inherits:
-
Struct
- Object
- Struct
- KafkaSyrup::Protocol::ProduceResponse::Partition
- Defined in:
- lib/kafka_syrup/protocol/produce_response.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#id ⇒ Object
Returns the value of attribute id.
-
#offset ⇒ Object
Returns the value of attribute offset.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code
50 51 52 |
# File 'lib/kafka_syrup/protocol/produce_response.rb', line 50 def code @code end |
#id ⇒ Object
Returns the value of attribute id
50 51 52 |
# File 'lib/kafka_syrup/protocol/produce_response.rb', line 50 def id @id end |
#offset ⇒ Object
Returns the value of attribute offset
50 51 52 |
# File 'lib/kafka_syrup/protocol/produce_response.rb', line 50 def offset @offset end |
Class Method Details
.decode(io) ⇒ Object
59 60 61 62 63 64 65 |
# File 'lib/kafka_syrup/protocol/produce_response.rb', line 59 def self.decode(io) new( E.read_int32(io), # ID E.read_int16(io), # Code E.read_int64(io) # Offset ) end |
Instance Method Details
#encode ⇒ Object
51 52 53 54 55 56 57 |
# File 'lib/kafka_syrup/protocol/produce_response.rb', line 51 def encode [ E.write_int32(id), E.write_int16(code), E.write_int64(offset) ].join end |