Sha256: 68eec3047c4265aa3d3e3a718a16b4a9e59d6a8e6a8e6da57947443be771b0ae

Contents?: true

Size: 736 Bytes

Versions: 13

Compression:

Stored size: 736 Bytes

Contents

module Rdkafka
  class Admin
    class CreatePartitionsHandle < AbstractHandle
      layout :pending, :bool,
             :response, :int,
             :error_string, :pointer,
             :result_name, :pointer

      # @return [String] the name of the operation
      def operation_name
        "create partitions"
      end

      # @return [Boolean] whether the create topic was successful
      def create_result
        CreatePartitionsReport.new(self[:error_string], self[:result_name])
      end

      def raise_error
        raise RdkafkaError.new(
            self[:response],
            broker_message: CreatePartitionsReport.new(self[:error_string], self[:result_name]).error_string
        )
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
karafka-rdkafka-0.12.4 lib/rdkafka/admin/create_partitions_handle.rb
karafka-rdkafka-0.13.5 lib/rdkafka/admin/create_partitions_handle.rb
karafka-rdkafka-0.13.4 lib/rdkafka/admin/create_partitions_handle.rb
karafka-rdkafka-0.13.3 lib/rdkafka/admin/create_partitions_handle.rb
karafka-rdkafka-0.13.2 lib/rdkafka/admin/create_partitions_handle.rb
karafka-rdkafka-0.13.1 lib/rdkafka/admin/create_partitions_handle.rb
karafka-rdkafka-0.13.0 lib/rdkafka/admin/create_partitions_handle.rb
karafka-rdkafka-0.13.0.beta2 lib/rdkafka/admin/create_partitions_handle.rb
karafka-rdkafka-0.13.0.beta1 lib/rdkafka/admin/create_partitions_handle.rb
karafka-rdkafka-0.12.3 lib/rdkafka/admin/create_partitions_handle.rb
karafka-rdkafka-0.12.2 lib/rdkafka/admin/create_partitions_handle.rb
karafka-rdkafka-0.12.1 lib/rdkafka/admin/create_partitions_handle.rb
karafka-rdkafka-0.12.1.beta1 lib/rdkafka/admin/create_partitions_handle.rb