Sha256: 221c10a2089b49a15282f3cfd1384afa23e9a0bf447dbf3102053004d07bd66a

Contents?: true

Size: 592 Bytes

Versions: 8

Compression:

Stored size: 592 Bytes

Contents

module Kafka
  module Protocol

    class CreatePartitionsResponse
      attr_reader :errors

      def initialize(throttle_time_ms:, errors:)
        @throttle_time_ms = throttle_time_ms
        @errors = errors
      end

      def self.decode(decoder)
        throttle_time_ms = decoder.int32
        errors = decoder.array do
          topic = decoder.string
          error_code = decoder.int16
          error_message = decoder.string
          [topic, error_code, error_message]
        end

        new(throttle_time_ms: throttle_time_ms, errors: errors)
      end
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ruby-kafka-0.6.0.beta4 lib/kafka/protocol/create_partitions_response.rb
ruby-kafka-0.6.0.beta3 lib/kafka/protocol/create_partitions_response.rb
ruby-kafka-0.6.0.beta2 lib/kafka/protocol/create_partitions_response.rb
ruby-kafka-0.6.0.beta1 lib/kafka/protocol/create_partitions_response.rb
ruby-kafka-0.5.5 lib/kafka/protocol/create_partitions_response.rb
ruby-kafka-0.5.4 lib/kafka/protocol/create_partitions_response.rb
ruby-kafka-0.5.4.beta1 lib/kafka/protocol/create_partitions_response.rb
ruby-kafka-0.5.3 lib/kafka/protocol/create_partitions_response.rb