2023-03-28 19:12:30 +00:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2017-10-17 11:28:51 +00:00
|
|
|
package raft
|
2017-02-15 21:30:07 +00:00
|
|
|
|
|
|
|
import (
|
2017-10-17 13:44:20 +00:00
|
|
|
"github.com/hashicorp/consul/command/flags"
|
2017-10-05 15:30:25 +00:00
|
|
|
"github.com/mitchellh/cli"
|
2017-02-15 21:30:07 +00:00
|
|
|
)
|
|
|
|
|
2017-10-17 06:03:03 +00:00
|
|
|
func New() *cmd {
|
|
|
|
return &cmd{}
|
2017-02-15 21:30:07 +00:00
|
|
|
}
|
|
|
|
|
2017-10-17 06:03:03 +00:00
|
|
|
type cmd struct{}
|
|
|
|
|
|
|
|
func (c *cmd) Run(args []string) int {
|
2017-10-05 15:30:25 +00:00
|
|
|
return cli.RunResultHelp
|
|
|
|
}
|
|
|
|
|
2017-10-17 06:03:03 +00:00
|
|
|
func (c *cmd) Synopsis() string {
|
2017-10-17 13:44:20 +00:00
|
|
|
return synopsis
|
2017-10-17 06:03:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c *cmd) Help() string {
|
2017-10-17 22:00:01 +00:00
|
|
|
return flags.Usage(help, nil)
|
2017-10-17 13:44:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const synopsis = "Provides cluster-level tools for Consul operators"
|
|
|
|
const help = `
|
2017-02-15 21:30:07 +00: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.
|
|
|
|
`
|