Class: Karafka::Cli::Topics::Help

Inherits:
Base
  • Object
show all
Defined in:
lib/karafka/cli/topics/help.rb

Overview

Declarative topics CLI sub-help

Instance Method Summary collapse

Methods included from Helpers::Colorize

#green, #grey, #red, #yellow

Instance Method Details

#callObject

Displays help information for all available topics management commands



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/karafka/cli/topics/help.rb', line 9

def call
  help_text = "    Karafka topics commands:\n      align        # Aligns configuration of all declarative topics based on definitions\n      create       # Creates topics with appropriate settings\n      delete       # Deletes all topics defined in the routes\n      health       # Checks topics health and replication settings (Pro only)\n      help         # Describes available topics management commands\n      migrate      # Creates missing topics, repartitions existing and aligns configuration\n      plan         # Plans migration process and prints changes to be applied\n      repartition  # Adds additional partitions to topics with fewer partitions than expected\n      reset        # Deletes and re-creates all topics\n\n    Options:\n      --detailed-exitcode  # Provides detailed exit codes (0=no changes, 1=error, 2=changes applied)\n\n    Examples:\n      karafka topics create\n      karafka topics plan --detailed-exitcode\n      karafka topics migrate\n      karafka topics align\n      karafka topics health\n\n    Note: All admin operations run on the default cluster only.\n  HELP\n\n  puts help_text\n\n  # We return false to indicate with exit code 0 that no changes were applied\n  false\nend\n"