Class: Kafka::Protocol::JoinGroupResponse
- Inherits:
-
Object
- Object
- Kafka::Protocol::JoinGroupResponse
- Defined in:
- lib/kafka/protocol/join_group_response.rb
Defined Under Namespace
Classes: Metadata
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#generation_id ⇒ Object
readonly
Returns the value of attribute generation_id.
-
#group_protocol ⇒ Object
readonly
Returns the value of attribute group_protocol.
-
#leader_id ⇒ Object
readonly
Returns the value of attribute leader_id.
-
#member_id ⇒ Object
readonly
Returns the value of attribute member_id.
-
#members ⇒ Object
readonly
Returns the value of attribute members.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(error_code:, generation_id:, group_protocol:, leader_id:, member_id:, members:) ⇒ JoinGroupResponse
constructor
A new instance of JoinGroupResponse.
Constructor Details
#initialize(error_code:, generation_id:, group_protocol:, leader_id:, member_id:, members:) ⇒ JoinGroupResponse
Returns a new instance of JoinGroupResponse.
14 15 16 17 18 19 20 21 |
# File 'lib/kafka/protocol/join_group_response.rb', line 14 def initialize(error_code:, generation_id:, group_protocol:, leader_id:, member_id:, members:) @error_code = error_code @generation_id = generation_id @group_protocol = group_protocol @leader_id = leader_id @member_id = member_id @members = members end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
8 9 10 |
# File 'lib/kafka/protocol/join_group_response.rb', line 8 def error_code @error_code end |
#generation_id ⇒ Object (readonly)
Returns the value of attribute generation_id.
10 11 12 |
# File 'lib/kafka/protocol/join_group_response.rb', line 10 def generation_id @generation_id end |
#group_protocol ⇒ Object (readonly)
Returns the value of attribute group_protocol.
10 11 12 |
# File 'lib/kafka/protocol/join_group_response.rb', line 10 def group_protocol @group_protocol end |
#leader_id ⇒ Object (readonly)
Returns the value of attribute leader_id.
12 13 14 |
# File 'lib/kafka/protocol/join_group_response.rb', line 12 def leader_id @leader_id end |
#member_id ⇒ Object (readonly)
Returns the value of attribute member_id.
12 13 14 |
# File 'lib/kafka/protocol/join_group_response.rb', line 12 def member_id @member_id end |
#members ⇒ Object (readonly)
Returns the value of attribute members.
12 13 14 |
# File 'lib/kafka/protocol/join_group_response.rb', line 12 def members @members end |
Class Method Details
.decode(decoder) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/kafka/protocol/join_group_response.rb', line 23 def self.decode(decoder) new( error_code: decoder.int16, generation_id: decoder.int32, group_protocol: decoder.string, leader_id: decoder.string, member_id: decoder.string, members: Hash[ decoder.array do member_id = decoder.string d = Decoder.from_string(decoder.bytes) [member_id, Metadata.new(d.int16, d.array { d.string }, d.bytes)] end ], ) end |