github.com/hernad/nomad@v1.6.112/command/scaling.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  // Ensure ScalingCommand satisfies the cli.Command interface.
    13  var _ cli.Command = &ScalingCommand{}
    14  
    15  // ScalingCommand implements cli.Command.
    16  type ScalingCommand struct {
    17  	Meta
    18  }
    19  
    20  // Help satisfies the cli.Command Help function.
    21  func (s *ScalingCommand) Help() string {
    22  	helpText := `
    23  Usage: nomad scaling <subcommand> [options]
    24  
    25    This command groups subcommands for interacting with the scaling API.
    26  
    27    Please see the individual subcommand help for detailed usage information.
    28  `
    29  	return strings.TrimSpace(helpText)
    30  }
    31  
    32  // Synopsis satisfies the cli.Command Synopsis function.
    33  func (s *ScalingCommand) Synopsis() string {
    34  	return "Interact with the Nomad scaling endpoint"
    35  }
    36  
    37  // Name returns the name of this command.
    38  func (s *ScalingCommand) Name() string { return "scaling" }
    39  
    40  // Run satisfies the cli.Command Run function.
    41  func (s *ScalingCommand) Run(_ []string) int { return cli.RunResultHelp }