github.com/ferranbt/nomad@v0.9.3-0.20190607002617-85c449b7667c/command/server.go (about)

     1  package command
     2  
     3  import (
     4  	"strings"
     5  
     6  	"github.com/mitchellh/cli"
     7  )
     8  
     9  type ServerCommand struct {
    10  	Meta
    11  }
    12  
    13  func (f *ServerCommand) Help() string {
    14  	helpText := `
    15  Usage: 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  
    38  func (f *ServerCommand) Synopsis() string {
    39  	return "Interact with servers"
    40  }
    41  
    42  func (f *ServerCommand) Name() string { return "server" }
    43  
    44  func (f *ServerCommand) Run(args []string) int {
    45  	return cli.RunResultHelp
    46  }