Class: Karafka::Web::App

Inherits:
Object
  • Object
show all
Defined in:
lib/karafka/web/app.rb

Overview

Proxy App that selects either Pro or regular app to handle the requests

Class Method Summary collapse

Class Method Details

.call(env, &block) ⇒ Object

Parameters:

  • env (Hash)

    Rack env

  • block (Proc)

    Rack block



10
11
12
# File 'lib/karafka/web/app.rb', line 10

def call(env, &block)
  engine.call(env, &block)
end

.engineClass

Returns regular or pro Web engine.

Returns:

  • (Class)

    regular or pro Web engine



15
16
17
# File 'lib/karafka/web/app.rb', line 15

def engine
  ::Karafka.pro? ? Pro::Ui::App : Ui::App
end