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
# File 'lib/karafka/cli/topics/help.rb', line 9

def call
  puts <<~HELP
    Karafka topics commands:
      align        # Aligns configuration of all declarative topics based on definitions
      create       # Creates topics with appropriate settings
      delete       # Deletes all topics defined in the routes
      help         # Describes available topics management commands
      migrate      # Creates missing topics, repartitions existing and aligns configuration
      plan         # Plans migration process and prints changes to be applied
      repartition  # Adds additional partitions to topics with fewer partitions than expected
      reset        # Deletes and re-creates all topics

    Options:
      --detailed-exitcode  # Provides detailed exit codes (0=no changes, 1=error, 2=changes applied)

    Examples:
      karafka topics create
      karafka topics plan --detailed-exitcode
      karafka topics migrate
      karafka topics align

    Note: All admin operations run on the default cluster only.
  HELP

  # We return false to indicate with exit code 0 that no changes were applied
  false
end