1package command
2
3import (
4	"strings"
5
6	"github.com/mitchellh/cli"
7)
8
9type OperatorRaftCommand struct {
10	Meta
11}
12
13func (c *OperatorRaftCommand) Help() string {
14	helpText := `
15Usage: nomad operator raft <subcommand> [options]
16
17  This command groups subcommands for interacting with Nomad's Raft subsystem.
18  The command can be used to verify Raft peers or in rare cases to recover
19  quorum by removing invalid peers.
20
21  List Raft peers:
22
23      $ nomad operator raft list-peers
24
25  Remove a Raft peer:
26
27      $ nomad operator raft remove-peer -peer-address "IP:Port"
28
29  Please see the individual subcommand help for detailed usage information.
30`
31	return strings.TrimSpace(helpText)
32}
33
34func (c *OperatorRaftCommand) Synopsis() string {
35	return "Provides access to the Raft subsystem"
36}
37
38func (c *OperatorRaftCommand) Name() string { return "operator raft" }
39
40func (c *OperatorRaftCommand) Run(args []string) int {
41	return cli.RunResultHelp
42}
43