github.com/hernad/nomad@v1.6.112/command/service.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 ServiceCommand struct {
    13  	Meta
    14  }
    15  
    16  func (c *ServiceCommand) Help() string {
    17  	helpText := `
    18  Usage: nomad service <subcommand> [options]
    19  
    20    This command groups subcommands for interacting with the services API.
    21  
    22    List services:
    23  
    24        $ nomad service list
    25  
    26    Detail an individual service:
    27  
    28        $ nomad service info <service_name>
    29  
    30    Delete an individual service registration:
    31  
    32        $ nomad service delete <service_name> <service_id>
    33  
    34    Please see the individual subcommand help for detailed usage information.
    35  `
    36  	return strings.TrimSpace(helpText)
    37  }
    38  
    39  func (c *ServiceCommand) Name() string { return "service" }
    40  
    41  func (c *ServiceCommand) Synopsis() string { return "Interact with registered services" }
    42  
    43  func (c *ServiceCommand) Run(_ []string) int { return cli.RunResultHelp }