1package command
2
3import (
4	"strings"
5
6	"github.com/mitchellh/cli"
7)
8
9type ServerCommand struct {
10	Meta
11}
12
13func (f *ServerCommand) Help() string {
14	helpText := `
15Usage: nomad server <subcommand> [options] [args]
16
17  This command groups subcommands for interacting with Nomad servers. Users can
18  list Servers, join a server to the cluster, and force leave a server.
19
20  List Nomad servers:
21
22      $ nomad server members
23
24  Join a new server to another:
25
26      $ nomad server join "IP:Port"
27
28  Force a server to leave:
29
30      $ nomad server force-leave <name>
31
32  Please see the individual subcommand help for detailed usage information.
33`
34
35	return strings.TrimSpace(helpText)
36}
37
38func (f *ServerCommand) Synopsis() string {
39	return "Interact with servers"
40}
41
42func (f *ServerCommand) Name() string { return "server" }
43
44func (f *ServerCommand) Run(args []string) int {
45	return cli.RunResultHelp
46}
47