Class: Kafka::Protocol::CreatePartitionsResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/kafka/protocol/create_partitions_response.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#errorsObject (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 error_message = decoder.string [topic, error_code, error_message] end new(throttle_time_ms: throttle_time_ms, errors: errors) end