Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#23671 Added synopsis for operator root and operator gossip command. #23855

Merged
merged 8 commits into from
Oct 18, 2024
Merged
10 changes: 10 additions & 0 deletions command/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,11 @@ func Commands(metaPtr *Meta, agentUi cli.Ui) map[string]cli.CommandFactory {
Meta: meta,
}, nil
},
"operator gossip": func() (cli.Command, error) {
return &OperatorGossipCommand{
Meta: meta,
}, nil
},
"operator gossip keyring": func() (cli.Command, error) {
return &OperatorGossipKeyringCommand{
Meta: meta,
Expand Down Expand Up @@ -804,6 +809,11 @@ func Commands(metaPtr *Meta, agentUi cli.Ui) map[string]cli.CommandFactory {
Meta: meta,
}, nil
},
"operator root": func() (cli.Command, error) {
return &OperatorRootCommand{
Meta: meta,
}, nil
},
"operator root keyring": func() (cli.Command, error) {
return &OperatorRootKeyringCommand{
Meta: meta,
Expand Down
30 changes: 30 additions & 0 deletions command/operator_gossip.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package command

import (
"strings"

"github.com/mitchellh/cli"
)

type OperatorGossipCommand struct {
Meta
}

func (*OperatorGossipCommand) Help() string {
helpText := `
Usage: nomad operator gossip [options]

This command is accessed by using one of the subcommands below.
`
jrasell marked this conversation as resolved.
Show resolved Hide resolved
return strings.TrimSpace(helpText)
}

func (*OperatorGossipCommand) Synopsis() string {
return "Provides access to the Gossip protocol"
}

func (f *OperatorGossipCommand) Name() string { return "operator gossip" }

func (f *OperatorGossipCommand) Run(args []string) int {
jrasell marked this conversation as resolved.
Show resolved Hide resolved
return cli.RunResultHelp
}
31 changes: 31 additions & 0 deletions command/operator_root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package command

import (
"strings"

"github.com/mitchellh/cli"
)

type OperatorRootCommand struct {
Meta
}

func (*OperatorRootCommand) Help() string {
helpText := `
Usage: nomad operator root [options]

This command is accessed by using one of the subcommands below.
`
jrasell marked this conversation as resolved.
Show resolved Hide resolved

return strings.TrimSpace(helpText)
}

func (*OperatorRootCommand) Synopsis() string {
return "Provides access to root encryption keys"
}

func (f *OperatorRootCommand) Name() string { return "operator gossip" }
jrasell marked this conversation as resolved.
Show resolved Hide resolved

func (f *OperatorRootCommand) Run(args []string) int {
jrasell marked this conversation as resolved.
Show resolved Hide resolved
return cli.RunResultHelp
}