2023-03-28 20:12:30 +01:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
2023-08-11 09:12:13 -04:00
|
|
|
// SPDX-License-Identifier: BUSL-1.1
|
2023-03-28 20:12:30 +01:00
|
|
|
|
2017-10-17 13:28:51 +02:00
|
|
|
package raft
|
2017-02-15 13:30:07 -08:00
|
|
|
|
|
|
|
import (
|
2017-10-17 15:44:20 +02:00
|
|
|
"github.com/hashicorp/consul/command/flags"
|
2017-10-05 17:30:25 +02:00
|
|
|
"github.com/mitchellh/cli"
|
2017-02-15 13:30:07 -08:00
|
|
|
)
|
|
|
|
|
2017-10-17 08:03:03 +02:00
|
|
|
func New() *cmd {
|
|
|
|
return &cmd{}
|
2017-02-15 13:30:07 -08:00
|
|
|
}
|
|
|
|
|
2017-10-17 08:03:03 +02:00
|
|
|
type cmd struct{}
|
|
|
|
|
|
|
|
func (c *cmd) Run(args []string) int {
|
2017-10-05 17:30:25 +02:00
|
|
|
return cli.RunResultHelp
|
|
|
|
}
|
|
|
|
|
2017-10-17 08:03:03 +02:00
|
|
|
func (c *cmd) Synopsis() string {
|
2017-10-17 15:44:20 +02:00
|
|
|
return synopsis
|
2017-10-17 08:03:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c *cmd) Help() string {
|
2017-10-18 00:00:01 +02:00
|
|
|
return flags.Usage(help, nil)
|
2017-10-17 15:44:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
const synopsis = "Provides cluster-level tools for Consul operators"
|
|
|
|
const help = `
|
2017-02-15 13:30:07 -08:00
|
|
|
Usage: consul operator raft <subcommand> [options]
|
|
|
|
|
|
|
|
The Raft operator command is used to interact with Consul's Raft subsystem. The
|
|
|
|
command can be used to verify Raft peers or in rare cases to recover quorum by
|
|
|
|
removing invalid peers.
|
|
|
|
`
|