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