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.



10
11
12
13
# File 'lib/kafka/protocol/sync_group_response.rb', line 10

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.



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

def error_code
  @error_code
end

#member_assignmentObject (readonly)

Returns the value of attribute member_assignment.



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

def member_assignment
  @member_assignment
end

Class Method Details

.decode(decoder) ⇒ Object



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

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