Class: Kafka::Protocol::SyncGroupResponse

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error_code:, member_assignment:) ⇒ SyncGroupResponse

Returns a new instance of SyncGroupResponse.


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

def initialize(error_code:, member_assignment:)
  @error_code = error_code
  @member_assignment = member_assignment
end

Instance Attribute Details

#error_codeObject (readonly)

Returns the value of attribute error_code


6
7
8
# File 'lib/kafka/protocol/sync_group_response.rb', line 6

def error_code
  @error_code
end

#member_assignmentObject (readonly)

Returns the value of attribute member_assignment


6
7
8
# File 'lib/kafka/protocol/sync_group_response.rb', line 6

def member_assignment
  @member_assignment
end

Class Method Details

.decode(decoder) ⇒ Object


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

def self.decode(decoder)
  new(
    error_code: decoder.int16,
    member_assignment: MemberAssignment.decode(Decoder.from_string(decoder.bytes)),
  )
end