Class: Kafka::Protocol::LeaveGroupRequest

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

Instance Method Summary collapse

Constructor Details

#initialize(group_id:, member_id:) ⇒ LeaveGroupRequest

Returns a new instance of LeaveGroupRequest.



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

def initialize(group_id:, member_id:)
  @group_id = group_id
  @member_id = member_id
end

Instance Method Details

#api_keyObject



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

def api_key
  LEAVE_GROUP_API
end

#encode(encoder) ⇒ Object



19
20
21
22
# File 'lib/kafka/protocol/leave_group_request.rb', line 19

def encode(encoder)
  encoder.write_string(@group_id)
  encoder.write_string(@member_id)
end

#response_classObject



15
16
17
# File 'lib/kafka/protocol/leave_group_request.rb', line 15

def response_class
  LeaveGroupResponse
end