Sha256: 21ea1be5cf683c1b73c9d8d121ac9dcfa5d1524028e8edecc672fd03c577451e

Contents?: true

Size: 527 Bytes

Versions: 56

Compression:

Stored size: 527 Bytes

Contents

module Kafka
  module Protocol
    class OffsetCommitResponse
      attr_reader :topics

      def initialize(topics:)
        @topics = topics
      end

      def self.decode(decoder)
        topics = decoder.array {
          topic = decoder.string
          partitions = decoder.array {
            partition = decoder.int32
            error_code = decoder.int16

            [partition, error_code]
          }

          [topic, Hash[partitions]]
        }

        new(topics: Hash[topics])
      end
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
ruby-kafka-0.6.0.beta4 lib/kafka/protocol/offset_commit_response.rb
ruby-kafka-0.6.0.beta3 lib/kafka/protocol/offset_commit_response.rb
ruby-kafka-0.6.0.beta2 lib/kafka/protocol/offset_commit_response.rb
ruby-kafka-0.6.0.beta1 lib/kafka/protocol/offset_commit_response.rb
ruby-kafka-0.5.5 lib/kafka/protocol/offset_commit_response.rb
ruby-kafka-0.5.4 lib/kafka/protocol/offset_commit_response.rb
ruby-kafka-0.5.4.beta1 lib/kafka/protocol/offset_commit_response.rb
ruby-kafka-0.5.3 lib/kafka/protocol/offset_commit_response.rb
ruby-kafka-0.5.2 lib/kafka/protocol/offset_commit_response.rb
ruby-kafka-0.5.2.beta3 lib/kafka/protocol/offset_commit_response.rb
ruby-kafka-0.5.2.beta2 lib/kafka/protocol/offset_commit_response.rb
ruby-kafka-0.5.2.beta1 lib/kafka/protocol/offset_commit_response.rb
ruby-kafka-0.5.1 lib/kafka/protocol/offset_commit_response.rb
ruby-kafka-0.5.1.beta2 lib/kafka/protocol/offset_commit_response.rb
ruby-kafka-0.5.1.beta1 lib/kafka/protocol/offset_commit_response.rb
ruby-kafka-0.4.4 lib/kafka/protocol/offset_commit_response.rb
ruby-kafka-0.5.0 lib/kafka/protocol/offset_commit_response.rb
ruby-kafka-0.5.0.beta6 lib/kafka/protocol/offset_commit_response.rb
ruby-kafka-0.5.0.beta5 lib/kafka/protocol/offset_commit_response.rb
ruby-kafka-0.5.0.beta4 lib/kafka/protocol/offset_commit_response.rb