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

     1  package command
     2  
     3  import (
     4  	"strings"
     5  
     6  	"github.com/mitchellh/cli"
     7  )
     8  
     9  // Ensure ScalingCommand satisfies the cli.Command interface.
    10  var _ cli.Command = &ScalingCommand{}
    11  
    12  // ScalingCommand implements cli.Command.
    13  type ScalingCommand struct {
    14  	Meta
    15  }
    16  
    17  // Help satisfies the cli.Command Help function.
    18  func (s *ScalingCommand) Help() string {
    19  	helpText := `
    20  Usage: nomad scaling <subcommand> [options]
    21  
    22    This command groups subcommands for interacting with the scaling API.
    23  
    24    Please see the individual subcommand help for detailed usage information.
    25  `
    26  	return strings.TrimSpace(helpText)
    27  }
    28  
    29  // Synopsis satisfies the cli.Command Synopsis function.
    30  func (s *ScalingCommand) Synopsis() string {
    31  	return "Interact with the Nomad scaling endpoint"
    32  }
    33  
    34  // Name returns the name of this command.
    35  func (s *ScalingCommand) Name() string { return "scaling" }
    36  
    37  // Run satisfies the cli.Command Run function.
    38  func (s *ScalingCommand) Run(_ []string) int { return cli.RunResultHelp }