Class: Kafka::Protocol::AddOffsetsToTxnResponse

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error_code:) ⇒ AddOffsetsToTxnResponse

Returns a new instance of AddOffsetsToTxnResponse.



9
10
11
# File 'lib/kafka/protocol/add_offsets_to_txn_response.rb', line 9

def initialize(error_code:)
  @error_code = error_code
end

Instance Attribute Details

#error_codeObject (readonly)

Returns the value of attribute error_code.



7
8
9
# File 'lib/kafka/protocol/add_offsets_to_txn_response.rb', line 7

def error_code
  @error_code
end

Class Method Details

.decode(decoder) ⇒ Object



13
14
15
16
17
# File 'lib/kafka/protocol/add_offsets_to_txn_response.rb', line 13

def self.decode(decoder)
  _throttle_time_ms = decoder.int32
  error_code = decoder.int16
  new(error_code: error_code)
end