github.com/hernad/nomad@v1.6.112/command/alloc.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 AllocCommand struct {
    13  	Meta
    14  }
    15  
    16  func (f *AllocCommand) Help() string {
    17  	helpText := `
    18  Usage: nomad alloc <subcommand> [options] [args]
    19  
    20    This command groups subcommands for interacting with allocations. Users can
    21    inspect the status, examine the filesystem or logs of an allocation.
    22  
    23    Examine an allocations status:
    24  
    25        $ nomad alloc status <alloc-id>
    26  
    27    Stream a task's logs:
    28  
    29        $ nomad alloc logs -f <alloc-id> <task>
    30  
    31    Please see the individual subcommand help for detailed usage information.
    32  `
    33  
    34  	return strings.TrimSpace(helpText)
    35  }
    36  
    37  func (f *AllocCommand) Synopsis() string {
    38  	return "Interact with allocations"
    39  }
    40  
    41  func (f *AllocCommand) Name() string { return "alloc" }
    42  
    43  func (f *AllocCommand) Run(args []string) int {
    44  	return cli.RunResultHelp
    45  }