github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/command/service.go (about) 1 package command 2 3 import ( 4 "strings" 5 6 "github.com/mitchellh/cli" 7 ) 8 9 type ServiceCommand struct { 10 Meta 11 } 12 13 func (c *ServiceCommand) Help() string { 14 helpText := ` 15 Usage: nomad service <subcommand> [options] 16 17 This command groups subcommands for interacting with the services API. 18 19 List services: 20 21 $ nomad service list 22 23 Detail an individual service: 24 25 $ nomad service info <service_name> 26 27 Delete an individual service registration: 28 29 $ nomad service delete <service_name> <service_id> 30 31 Please see the individual subcommand help for detailed usage information. 32 ` 33 return strings.TrimSpace(helpText) 34 } 35 36 func (c *ServiceCommand) Name() string { return "service" } 37 38 func (c *ServiceCommand) Synopsis() string { return "Interact with registered services" } 39 40 func (c *ServiceCommand) Run(_ []string) int { return cli.RunResultHelp }