Class: Kafka::Protocol::SyncGroupResponse
- Inherits:
-
Object
- Object
- Kafka::Protocol::SyncGroupResponse
- Defined in:
- lib/kafka/protocol/sync_group_response.rb
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#member_assignment ⇒ Object
readonly
Returns the value of attribute member_assignment.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(error_code:, member_assignment:) ⇒ SyncGroupResponse
constructor
A new instance of SyncGroupResponse.
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_code ⇒ Object (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_assignment ⇒ Object (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 21 22 23 |
# File 'lib/kafka/protocol/sync_group_response.rb', line 15 def self.decode(decoder) error_code = decoder.int16 member_assignment_bytes = decoder.bytes new( error_code: error_code, member_assignment: member_assignment_bytes ? MemberAssignment.decode(Decoder.from_string(member_assignment_bytes)) : nil ) end |