Class: Karafka::Cli::Flow
Overview
Description of topics flow (incoming/outgoing)
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#call ⇒ Object
Print out all defined routes in alphabetical order.
Methods inherited from Base
bind_to, desc, #initialize, option
Constructor Details
This class inherits a constructor from Karafka::Cli::Base
Instance Method Details
#call ⇒ Object
Print out all defined routes in alphabetical order
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/karafka/cli/flow.rb', line 11 def call topics.each do |topic| any_topics = !topic.responder&.topics.nil? = [] if any_topics << "#{topic.name} =>" topic.responder.topics.each_value do |responder_topic| features = [] features << (responder_topic.required? ? 'always' : 'conditionally') << format(responder_topic.name, "(#{features.join(', ')})") end else << "#{topic.name} => (nothing)" end Karafka.logger.info(.join("\n")) end end |