-
Notifications
You must be signed in to change notification settings - Fork 26
/
process.go
56 lines (45 loc) · 2.28 KB
/
process.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
50
51
52
53
54
55
56
package packit
// Process represents a process to be run during the launch phase as described
// in the specification lower than v0.9:
// https://github.com/buildpacks/spec/blob/main/buildpack.md#launch. The
// fields of the process are describe in the specification of the launch.toml
// file:
// https://github.com/buildpacks/spec/blob/main/buildpack.md#launchtoml-toml.
type Process struct {
// Type is an identifier to describe the type of process to be executed, eg.
// "web".
Type string `toml:"type"`
// Command is the start command to be executed at launch.
Command string `toml:"command"`
// Args is a list of arguments to be passed to the command at launch.
Args []string `toml:"args"`
// Direct indicates whether the process should bypass the shell when invoked.
Direct bool `toml:"direct"`
// Default indicates if this process should be the default when launched.
Default bool `toml:"default,omitempty"`
// WorkingDirectory indicates if this process should be run in a working
// directory other than the application directory. This can either be an
// absolute path or one relative to the default application directory.
WorkingDirectory string `toml:"working-directory,omitempty"`
}
// DirectProcess represents a process to be run during the launch phase as described
// in the specification higher or equal than v0.9:
// https://github.com/buildpacks/spec/blob/main/buildpack.md#launch. The
// fields of the process are describe in the specification of the launch.toml
// file:
// https://github.com/buildpacks/spec/blob/main/buildpack.md#launchtoml-toml.
type DirectProcess struct {
// Type is an identifier to describe the type of process to be executed, eg.
// "web".
Type string `toml:"type"`
// Command is the start command to be executed at launch.
Command []string `toml:"command"`
// Args is a list of arguments to be passed to the command at launch.
Args []string `toml:"args"`
// Default indicates if this process should be the default when launched.
Default bool `toml:"default,omitempty"`
// WorkingDirectory indicates if this process should be run in a working
// directory other than the application directory. This can either be an
// absolute path or one relative to the default application directory.
WorkingDirectory string `toml:"working-directory,omitempty"`
}