Class: Kafka::Protocol::CreatePartitionsResponse
- Inherits:
-
Object
- Object
- Kafka::Protocol::CreatePartitionsResponse
- Defined in:
- lib/kafka/protocol/create_partitions_response.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(throttle_time_ms:, errors:) ⇒ CreatePartitionsResponse
constructor
A new instance of CreatePartitionsResponse.
Constructor Details
#initialize(throttle_time_ms:, errors:) ⇒ CreatePartitionsResponse
Returns a new instance of CreatePartitionsResponse.
9 10 11 12 |
# File 'lib/kafka/protocol/create_partitions_response.rb', line 9 def initialize(throttle_time_ms:, errors:) @throttle_time_ms = throttle_time_ms @errors = errors end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
7 8 9 |
# File 'lib/kafka/protocol/create_partitions_response.rb', line 7 def errors @errors end |
Class Method Details
.decode(decoder) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/kafka/protocol/create_partitions_response.rb', line 14 def self.decode(decoder) throttle_time_ms = decoder.int32 errors = decoder.array do topic = decoder.string error_code = decoder.int16 = decoder.string [topic, error_code, ] end new(throttle_time_ms: throttle_time_ms, errors: errors) end |