Class: Karafka::Web::Ui::Models::Status::Checks::Enabled
- Defined in:
- lib/karafka/web/ui/models/status/checks/enabled.rb
Overview
Note:
This check does NOT verify if the group is active because that may depend on configuration details. It only checks that the routing is aware of the deserializer and other Web UI requirements.
Checks if karafka-web is enabled in the karafka.rb routing.
This is the first check in the chain and verifies that the consumer group for the Web UI is properly injected into the routing. Without this, the Web UI cannot function.
Instance Method Summary collapse
-
#call ⇒ Status::Step
Executes the enabled check.
Methods inherited from Base
depends_on, halted_details, independent!, independent?, #initialize
Constructor Details
This class inherits a constructor from Karafka::Web::Ui::Models::Status::Checks::Base
Instance Method Details
#call ⇒ Status::Step
Executes the enabled check.
Looks for the Web UI consumer group in the Karafka routing.
26 27 28 29 30 31 32 |
# File 'lib/karafka/web/ui/models/status/checks/enabled.rb', line 26 def call enabled = ::Karafka::App.routes.map(&:name).include?( ::Karafka::Web.config.group_id ) step(enabled ? :success : :failure) end |