github.com/hernad/nomad@v1.6.112/command/server.go (about)

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