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) ⇒ Karafka::Processing::Jobs::Consume

Returns consumption job.

Parameters:

Returns:



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

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

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

Returns revocation job.

Parameters:

Returns:



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

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

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

Returns shutdown job.

Parameters:

Returns:



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

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