Class: Kafkat::Command::Base
Direct Known Subclasses
Kafkat::ClusterRestart::Subcommands::Good, Kafkat::ClusterRestart::Subcommands::Help, Kafkat::ClusterRestart::Subcommands::Log, Kafkat::ClusterRestart::Subcommands::Next, Kafkat::ClusterRestart::Subcommands::Reset, Kafkat::ClusterRestart::Subcommands::Restore, Kafkat::ClusterRestart::Subcommands::Start, Brokers, CleanIndexes, ClusterRestart, Controller, Describe, Drain, ElectLeaders, Reassign, Resign, ResignForce, SetReplicationFactor, Topics, VerifyReplicas
Class Attribute Summary collapse
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Logging
#print_err
#prompt_and_execute_assignments
Methods included from Formatting
#justify, #print_assignment, #print_assignment_header, #print_broker, #print_broker_header, #print_partition, #print_partition_header, #print_topic, #print_topic_header, #print_topic_name
Constructor Details
#initialize(config) ⇒ Base
Returns a new instance of Base.
39
40
41
|
# File 'lib/kafkat/command.rb', line 39
def initialize(config)
@config = config
end
|
Class Attribute Details
.command_name ⇒ Object
Returns the value of attribute command_name.
23
24
25
|
# File 'lib/kafkat/command.rb', line 23
def command_name
@command_name
end
|
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
20
21
22
|
# File 'lib/kafkat/command.rb', line 20
def config
@config
end
|
Class Method Details
.register_as(name) ⇒ Object
26
27
28
29
|
# File 'lib/kafkat/command.rb', line 26
def self.register_as(name)
@command_name = name
Command.all[name] = self
end
|
.usage(format, description) ⇒ Object
35
36
37
|
# File 'lib/kafkat/command.rb', line 35
def self.usage(format, description)
usages << [format, description]
end
|
.usages ⇒ Object
31
32
33
|
# File 'lib/kafkat/command.rb', line 31
def self.usages
@usages ||= []
end
|
Instance Method Details
#admin ⇒ Object
47
48
49
50
51
|
# File 'lib/kafkat/command.rb', line 47
def admin
@admin ||= begin
Interface::Admin.new(config)
end
end
|
#kafka_logs ⇒ Object
59
60
61
62
63
|
# File 'lib/kafkat/command.rb', line 59
def kafka_logs
@kafka_logs ||= begin
Interface::KafkaLogs.new(config)
end
end
|
#run ⇒ Object
43
44
45
|
# File 'lib/kafkat/command.rb', line 43
def run
raise NotImplementedError
end
|
#zookeeper ⇒ Object
53
54
55
56
57
|
# File 'lib/kafkat/command.rb', line 53
def zookeeper
@zookeeper ||= begin
Interface::Zookeeper.new(config)
end
end
|