Sha256: c26aa6b133340ed47acda6f40ad2d09d1308eb5a70f82b05c893ab58002bed23

Contents?: true

Size: 889 Bytes

Versions: 39

Compression:

Stored size: 889 Bytes

Contents

# frozen_string_literal: true

module Kafka
  module Protocol
    class JoinGroupResponse
      attr_reader :error_code

      attr_reader :generation_id, :group_protocol

      attr_reader :leader_id, :member_id, :members

      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

      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 { [decoder.string, decoder.bytes] }],
        )
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
ruby-kafka-1.2.0 lib/kafka/protocol/join_group_response.rb
ruby-kafka-1.1.0 lib/kafka/protocol/join_group_response.rb
ruby-kafka-1.1.0.beta1 lib/kafka/protocol/join_group_response.rb
ruby-kafka-1.0.0 lib/kafka/protocol/join_group_response.rb
ruby-kafka-0.7.10 lib/kafka/protocol/join_group_response.rb
ruby-kafka-0.7.9 lib/kafka/protocol/join_group_response.rb
ruby-kafka-0.7.8 lib/kafka/protocol/join_group_response.rb
ruby-kafka-0.7.7 lib/kafka/protocol/join_group_response.rb
ruby-kafka-custom-0.7.7.26 lib/kafka/protocol/join_group_response.rb
ruby-kafka-0.7.6 lib/kafka/protocol/join_group_response.rb
ruby-kafka-0.7.6.beta2 lib/kafka/protocol/join_group_response.rb
ruby-kafka-0.7.6.beta1 lib/kafka/protocol/join_group_response.rb
ruby-kafka-0.7.5 lib/kafka/protocol/join_group_response.rb
ruby-kafka-0.7.5.beta1 lib/kafka/protocol/join_group_response.rb
ruby-kafka-0.7.4 lib/kafka/protocol/join_group_response.rb
ruby-kafka-0.7.3 lib/kafka/protocol/join_group_response.rb
ruby-kafka-0.7.2 lib/kafka/protocol/join_group_response.rb
ruby-kafka-0.7.1.debugcorruption2 lib/kafka/protocol/join_group_response.rb
ruby-kafka-0.7.1.messagecorruptiondebug lib/kafka/protocol/join_group_response.rb
ruby-kafka-0.7.1 lib/kafka/protocol/join_group_response.rb