Class: Karafka::Web::Ui::Models::Status::Checks::Topics
- Defined in:
- lib/karafka/web/ui/models/status/checks/topics.rb
Overview
Checks if all required Web UI topics exist in the Kafka cluster.
The Web UI requires several topics to function:
-
consumers states topic
-
consumers reports topic
-
consumers metrics topic
-
errors topic
Class Method Summary collapse
-
.halted_details ⇒ Hash
Empty hash for halted state.
Instance Method Summary collapse
-
#call ⇒ Status::Step
Executes the topics check.
Methods inherited from Base
depends_on, independent!, independent?, #initialize
Constructor Details
This class inherits a constructor from Karafka::Web::Ui::Models::Status::Checks::Base
Class Method Details
.halted_details ⇒ Hash
Returns empty hash for halted state.
21 22 23 |
# File 'lib/karafka/web/ui/models/status/checks/topics.rb', line 21 def halted_details {} end |
Instance Method Details
#call ⇒ Status::Step
Executes the topics check.
Verifies that all required topics exist by checking the cluster info cached in the context.
32 33 34 35 36 37 |
# File 'lib/karafka/web/ui/models/status/checks/topics.rb', line 32 def call details = context.topics_details status = (details.all? { |_, detail| detail[:present] }) ? :success : :failure step(status, details) end |