Sha256: 58816b6ca29a3ace9142092a63ff1ba0f7f256d77b8b8eca6823fc8a34d8f93e

Contents?: true

Size: 1.11 KB

Versions: 10

Compression:

Stored size: 1.11 KB

Contents

# frozen_string_literal: true

module Karafka
  module Processing
    # Class responsible for deciding what type of job should we build to run a given command and
    # for building a proper job for it.
    class JobsBuilder
      # @param executor [Karafka::Processing::Executor]
      # @param messages [Karafka::Messages::Messages] messages batch to be consumed
      # @return [Karafka::Processing::Jobs::Consume] consumption job
      def consume(executor, messages)
        Jobs::Consume.new(executor, messages)
      end

      # @param executor [Karafka::Processing::Executor]
      # @return [Karafka::Processing::Jobs::Eofed] eofed job
      def eofed(executor)
        Jobs::Eofed.new(executor)
      end

      # @param executor [Karafka::Processing::Executor]
      # @return [Karafka::Processing::Jobs::Revoked] revocation job
      def revoked(executor)
        Jobs::Revoked.new(executor)
      end

      # @param executor [Karafka::Processing::Executor]
      # @return [Karafka::Processing::Jobs::Shutdown] shutdown job
      def shutdown(executor)
        Jobs::Shutdown.new(executor)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
karafka-2.4.17 lib/karafka/processing/jobs_builder.rb
karafka-2.4.16 lib/karafka/processing/jobs_builder.rb
karafka-2.4.15 lib/karafka/processing/jobs_builder.rb
karafka-2.4.14 lib/karafka/processing/jobs_builder.rb
karafka-2.4.13 lib/karafka/processing/jobs_builder.rb
karafka-2.4.12 lib/karafka/processing/jobs_builder.rb
karafka-2.4.11 lib/karafka/processing/jobs_builder.rb
karafka-2.4.10 lib/karafka/processing/jobs_builder.rb
karafka-2.4.9 lib/karafka/processing/jobs_builder.rb
karafka-2.4.8 lib/karafka/processing/jobs_builder.rb