Class: Kafka::Protocol::AddPartitionsToTxnResponse
- Inherits:
-
Object
- Object
- Kafka::Protocol::AddPartitionsToTxnResponse
- Defined in:
- lib/kafka/protocol/add_partitions_to_txn_response.rb
Defined Under Namespace
Classes: PartitionError, TopicPartitionsError
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(errors:) ⇒ AddPartitionsToTxnResponse
constructor
A new instance of AddPartitionsToTxnResponse.
Constructor Details
#initialize(errors:) ⇒ AddPartitionsToTxnResponse
Returns a new instance of AddPartitionsToTxnResponse.
26 27 28 |
# File 'lib/kafka/protocol/add_partitions_to_txn_response.rb', line 26 def initialize(errors:) @errors = errors end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
24 25 26 |
# File 'lib/kafka/protocol/add_partitions_to_txn_response.rb', line 24 def errors @errors end |
Class Method Details
.decode(decoder) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/kafka/protocol/add_partitions_to_txn_response.rb', line 30 def self.decode(decoder) _throttle_time_ms = decoder.int32 errors = decoder.array do TopicPartitionsError.new( topic: decoder.string, partitions: decoder.array do PartitionError.new( partition: decoder.int32, error_code: decoder.int16 ) end ) end new(errors: errors) end |