Class: Karafka::Cli::Topics
- Includes:
- Helpers::Colorize
- Defined in:
- lib/karafka/cli/topics.rb,
lib/karafka/cli/topics/base.rb,
lib/karafka/cli/topics/plan.rb,
lib/karafka/cli/topics/align.rb,
lib/karafka/cli/topics/reset.rb,
lib/karafka/cli/topics/create.rb,
lib/karafka/cli/topics/delete.rb,
lib/karafka/cli/topics/migrate.rb,
lib/karafka/cli/topics/repartition.rb
Overview
CLI actions related to Kafka cluster topics management
Defined Under Namespace
Classes: Align, Base, Create, Delete, Migrate, Plan, Repartition, Reset
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods included from Helpers::Colorize
Methods inherited from Base
aliases, commands, desc, #initialize, load, name, names, option, parse_options
Constructor Details
This class inherits a constructor from Karafka::Cli::Base
Instance Method Details
#call(action = 'missing') ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/karafka/cli/topics.rb', line 14 def call(action = 'missing') case action when 'create' Topics::Create.new.call when 'delete' Topics::Delete.new.call when 'reset' Topics::Reset.new.call when 'repartition' Topics::Repartition.new.call when 'migrate' Topics::Migrate.new.call when 'align' Topics::Align.new.call when 'plan' Topics::Plan.new.call else raise ::ArgumentError, "Invalid topics action: #{action}" end end |