Class: KafkaSyrup::Protocol::MetadataResponse::Partition
- Inherits:
-
Struct
- Object
- Struct
- KafkaSyrup::Protocol::MetadataResponse::Partition
- Defined in:
- lib/kafka_syrup/protocol/metadata_response.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#id ⇒ Object
Returns the value of attribute id.
-
#isr ⇒ Object
Returns the value of attribute isr.
-
#leader ⇒ Object
Returns the value of attribute leader.
-
#replicas ⇒ Object
Returns the value of attribute replicas.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code
82 83 84 |
# File 'lib/kafka_syrup/protocol/metadata_response.rb', line 82 def code @code end |
#id ⇒ Object
Returns the value of attribute id
82 83 84 |
# File 'lib/kafka_syrup/protocol/metadata_response.rb', line 82 def id @id end |
#isr ⇒ Object
Returns the value of attribute isr
82 83 84 |
# File 'lib/kafka_syrup/protocol/metadata_response.rb', line 82 def isr @isr end |
#leader ⇒ Object
Returns the value of attribute leader
82 83 84 |
# File 'lib/kafka_syrup/protocol/metadata_response.rb', line 82 def leader @leader end |
#replicas ⇒ Object
Returns the value of attribute replicas
82 83 84 |
# File 'lib/kafka_syrup/protocol/metadata_response.rb', line 82 def replicas @replicas end |
Class Method Details
.decode(io) ⇒ Object
93 94 95 96 97 98 99 100 101 |
# File 'lib/kafka_syrup/protocol/metadata_response.rb', line 93 def self.decode(io) new( E.read_int16(io), # Error Code E.read_int32(io), # ID E.read_int32(io), # Leader E.read_array(io, &E.method(:read_int32)), # Replicas E.read_array(io, &E.method(:read_int32)) # ISR ) end |