Class: Karafka::Processing::JobsBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/karafka/processing/jobs_builder.rb

Overview

Class responsible for deciding what type of job should we build to run a given command and for building a proper job for it.

Direct Known Subclasses

Karafka::Pro::Processing::JobsBuilder

Instance Method Summary collapse

Instance Method Details

#consume(executor, messages, coordinator) ⇒ Karafka::Processing::Jobs::Consume

Returns consumption job.

Parameters:

Returns:



12
13
14
# File 'lib/karafka/processing/jobs_builder.rb', line 12

def consume(executor, messages, coordinator)
  Jobs::Consume.new(executor, messages, coordinator)
end

#revoked(executor) ⇒ Karafka::Processing::Jobs::Revoked

Returns revocation job.

Parameters:

Returns:



18
19
20
# File 'lib/karafka/processing/jobs_builder.rb', line 18

def revoked(executor)
  Jobs::Revoked.new(executor)
end

#shutdown(executor) ⇒ Karafka::Processing::Jobs::Shutdown

Returns shutdown job.

Parameters:

Returns:



24
25
26
# File 'lib/karafka/processing/jobs_builder.rb', line 24

def shutdown(executor)
  Jobs::Shutdown.new(executor)
end