Sha256: 2ffd2e6e02792b16a9641b72798abb0491997ee2fb7d9efb135fc7e908b2cd7d

Contents?: true

Size: 1.01 KB

Versions: 45

Compression:

Stored size: 1.01 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
      # @param coordinator [Karafka::Processing::Coordinator]
      # @return [Karafka::Processing::Jobs::Consume] consumption job
      def consume(executor, messages, coordinator)
        Jobs::Consume.new(executor, messages, coordinator)
      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

45 entries across 45 versions & 1 rubygems

Version Path
karafka-2.0.38 lib/karafka/processing/jobs_builder.rb
karafka-2.0.37 lib/karafka/processing/jobs_builder.rb
karafka-2.0.36 lib/karafka/processing/jobs_builder.rb
karafka-2.0.35 lib/karafka/processing/jobs_builder.rb
karafka-2.0.34 lib/karafka/processing/jobs_builder.rb
karafka-2.0.33 lib/karafka/processing/jobs_builder.rb
karafka-2.0.32 lib/karafka/processing/jobs_builder.rb
karafka-2.0.31 lib/karafka/processing/jobs_builder.rb
karafka-2.0.30 lib/karafka/processing/jobs_builder.rb
karafka-2.0.29 lib/karafka/processing/jobs_builder.rb
karafka-2.0.28 lib/karafka/processing/jobs_builder.rb
karafka-2.0.27 lib/karafka/processing/jobs_builder.rb
karafka-2.0.26 lib/karafka/processing/jobs_builder.rb
karafka-2.0.24 lib/karafka/processing/jobs_builder.rb
karafka-2.0.23 lib/karafka/processing/jobs_builder.rb
karafka-2.0.22 lib/karafka/processing/jobs_builder.rb
karafka-2.0.21 lib/karafka/processing/jobs_builder.rb
karafka-2.0.20 lib/karafka/processing/jobs_builder.rb
karafka-2.0.19 lib/karafka/processing/jobs_builder.rb
karafka-2.0.18 lib/karafka/processing/jobs_builder.rb