-
Notifications
You must be signed in to change notification settings - Fork 2k
/
job.go
49 lines (31 loc) · 879 Bytes
/
job.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
44
45
46
47
48
49
package command
import (
"strings"
"github.com/mitchellh/cli"
)
type JobCommand struct {
Meta
}
func (f *JobCommand) Help() string {
helpText := `
Usage: nomad job <subcommand> [options] [args]
This command groups subcommands for interacting with jobs.
Run a new job or update an existing job:
$ nomad job run <path>
Plan the run of a job to determine what changes would occur:
$ nomad job plan <path>
Stop a running job:
$ nomad job stop <name>
Examine the status of a running job:
$ nomad job status <name>
Please see the individual subcommand help for detailed usage information.
`
return strings.TrimSpace(helpText)
}
func (f *JobCommand) Synopsis() string {
return "Interact with jobs"
}
func (f *JobCommand) Name() string { return "job" }
func (f *JobCommand) Run(args []string) int {
return cli.RunResultHelp
}