MCPcopy Index your code
hub / github.com/cloudfoundry/cli / Task

Struct Task

resources/task_resource.go:8–38  ·  view source on GitHub ↗

Task represents a Cloud Controller V3 Task.

Source from the content-addressed store, hash-verified

6
7// Task represents a Cloud Controller V3 Task.
8type Task struct {
9 // Command represents the command that will be executed. May be excluded
10 // based on the user's role.
11 Command string `json:"command,omitempty"`
12 // CreatedAt represents the time with zone when the object was created.
13 CreatedAt string `json:"created_at,omitempty"`
14 // DiskInMB represents the disk in MB allocated for the task.
15 DiskInMB uint64 `json:"disk_in_mb,omitempty"`
16 // GUID represents the unique task identifier.
17 GUID string `json:"guid,omitempty"`
18 // LogRateLimitInBPS represents the log rate limit in bytes allocated for the task.
19 LogRateLimitInBPS int `json:"log_rate_limit_in_bytes_per_second,omitempty"`
20 // MemoryInMB represents the memory in MB allocated for the task.
21 MemoryInMB uint64 `json:"memory_in_mb,omitempty"`
22 // Name represents the name of the task.
23 Name string `json:"name,omitempty"`
24 // SequenceID represents the user-facing id of the task. This number is
25 // unique for every task associated with a given app.
26 SequenceID int64 `json:"sequence_id,omitempty"`
27 // State represents the task state.
28 State constant.TaskState `json:"state,omitempty"`
29 // Tasks can use a process as a template to fill in
30 // command, memory, disk values
31 //
32 // Using a pointer so that it can be set to nil to prevent
33 // json serialization when no template is used
34 Template *TaskTemplate `json:"template,omitempty"`
35
36 // Result contains the task result
37 Result *TaskResult `json:"result,omitempty"`
38}
39
40type TaskTemplate struct {
41 Process TaskProcessTemplate `json:"process,omitempty"`

Callers 6

task_test.goFile · 0.92
RunTaskMethod · 0.92
GetApplicationTasksMethod · 0.92
TerminateTaskMethod · 0.92
PollTaskMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected