Module: Karafka::Controllers::Includer

Defined in:
lib/karafka/controllers/includer.rb

Overview

Module used to inject functionalities into a given controller class, based on the controller topic and its settings We don’t need all the behaviors in all the cases, so it is totally not worth having everything in all the cases all the time

Class Method Summary collapse

Class Method Details

.call(controller_class) ⇒ Object

Parameters:

  • controller_class (Class)

    controller class, that will get some functionalities based on the topic under which it operates



14
15
16
17
18
19
20
# File 'lib/karafka/controllers/includer.rb', line 14

def call(controller_class)
  topic = controller_class.topic

  bind_backend(controller_class, topic)
  bind_params(controller_class, topic)
  bind_responders(controller_class, topic)
end