Sha256: a1bca722a392736f783d6a946ce10be552e9c95414610eba15b9917ca50e7557

Contents?: true

Size: 661 Bytes

Versions: 9

Compression:

Stored size: 661 Bytes

Contents

# frozen_string_literal: true

require "kafka/protocol/member_assignment"

module Kafka
  module Protocol
    class SyncGroupResponse
      attr_reader :error_code, :member_assignment

      def initialize(error_code:, member_assignment:)
        @error_code = error_code
        @member_assignment = member_assignment
      end

      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
    end
  end
end

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
ruby-kafka-1.5.0 lib/kafka/protocol/sync_group_response.rb
ruby-kafka-aws-iam-1.4.5 lib/kafka/protocol/sync_group_response.rb
ruby-kafka-aws-iam-1.4.4 lib/kafka/protocol/sync_group_response.rb
ruby-kafka-aws-iam-1.4.3 lib/kafka/protocol/sync_group_response.rb
ruby-kafka-aws-iam-1.4.2 lib/kafka/protocol/sync_group_response.rb
ruby-kafka-aws-iam-1.4.1 lib/kafka/protocol/sync_group_response.rb
ruby-kafka-1.4.0 lib/kafka/protocol/sync_group_response.rb
ruby-kafka-temp-fork-0.0.2 lib/kafka/protocol/sync_group_response.rb
ruby-kafka-temp-fork-0.0.1 lib/kafka/protocol/sync_group_response.rb