github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/command/volume.go (about)

     1  package command
     2  
     3  import (
     4  	"strings"
     5  
     6  	"github.com/mitchellh/cli"
     7  )
     8  
     9  type VolumeCommand struct {
    10  	Meta
    11  }
    12  
    13  func (c *VolumeCommand) Help() string {
    14  	helpText := `
    15  Usage: nomad volume <subcommand> [options]
    16  
    17    volume groups commands that interact with volumes.
    18  
    19    Register a new volume or update an existing volume:
    20  
    21        $ nomad volume register <input>
    22  
    23    Examine the status of a volume:
    24  
    25        $ nomad volume status <id>
    26  
    27    Deregister an unused volume:
    28  
    29        $ nomad volume deregister <id>
    30  
    31    Detach an unused volume:
    32  
    33        $ nomad volume detach <vol id> <node id>
    34  
    35    Please see the individual subcommand help for detailed usage information.
    36  `
    37  	return strings.TrimSpace(helpText)
    38  }
    39  
    40  func (c *VolumeCommand) Name() string {
    41  	return "volume"
    42  }
    43  
    44  func (c *VolumeCommand) Synopsis() string {
    45  	return "Interact with volumes"
    46  }
    47  
    48  func (c *VolumeCommand) Run(args []string) int {
    49  	return cli.RunResultHelp
    50  }