2023-03-28 19:12:30 +00:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
2023-08-11 13:12:13 +00:00
|
|
|
// SPDX-License-Identifier: BUSL-1.1
|
2023-03-28 19:12:30 +00:00
|
|
|
|
2017-10-17 11:28:51 +00:00
|
|
|
package autopilot
|
2017-10-17 06:32:17 +00:00
|
|
|
|
|
|
|
import (
|
2017-10-17 13:44:20 +00:00
|
|
|
"github.com/hashicorp/consul/command/flags"
|
2017-10-17 06:32:17 +00:00
|
|
|
"github.com/mitchellh/cli"
|
|
|
|
)
|
|
|
|
|
|
|
|
func New() *cmd {
|
|
|
|
return &cmd{}
|
|
|
|
}
|
|
|
|
|
|
|
|
type cmd struct{}
|
|
|
|
|
|
|
|
func (c *cmd) Run(args []string) int {
|
|
|
|
return cli.RunResultHelp
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *cmd) Synopsis() string {
|
2017-10-17 13:44:20 +00:00
|
|
|
return synopsis
|
2017-10-17 06:32:17 +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
|
|
|
}
|
2017-10-17 06:32:17 +00:00
|
|
|
|
2017-10-17 13:44:20 +00:00
|
|
|
const synopsis = "Provides tools for modifying Autopilot configuration"
|
|
|
|
const help = `
|
|
|
|
Usage: consul operator autopilot <subcommand> [options]
|
2017-10-17 06:32:17 +00:00
|
|
|
|
2017-10-17 13:44:20 +00:00
|
|
|
The Autopilot operator command is used to interact with Consul's Autopilot
|
|
|
|
subsystem. The command can be used to view or modify the current configuration.
|
|
|
|
`
|