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


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

def initialize(error_code:)
  @error_code = error_code
end

Instance Attribute Details

#error_codeObject (readonly)

Returns the value of attribute error_code


5
6
7
# File 'lib/kafka/protocol/add_offsets_to_txn_response.rb', line 5

def error_code
  @error_code
end

Class Method Details

.decode(decoder) ⇒ Object


11
12
13
14
15
# File 'lib/kafka/protocol/add_offsets_to_txn_response.rb', line 11

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