3 // Container is an arvados#container resource.
4 type Container struct {
5 UUID string `json:"uuid"`
6 Command []string `json:"command"`
7 ContainerImage string `json:"container_image"`
8 Cwd string `json:"cwd"`
9 Environment map[string]string `json:"environment"`
10 LockedByUUID string `json:"locked_by_uuid"`
11 Mounts map[string]Mount `json:"mounts"`
12 Output string `json:"output"`
13 OutputPath string `json:"output_path"`
14 Priority int `json:"priority"`
15 RuntimeConstraints RuntimeConstraints `json:"runtime_constraints"`
16 State ContainerState `json:"state"`
19 // Mount is special behavior to attach to a filesystem path or device.
21 Kind string `json:"kind"`
22 Writable bool `json:"writable"`
23 PortableDataHash string `json:"portable_data_hash"`
24 UUID string `json:"uuid"`
25 DeviceType string `json:"device_type"`
26 Path string `json:"path"`
27 Content interface{} `json:"content"`
30 // RuntimeConstraints specify a container's compute resources (RAM,
31 // CPU) and network connectivity.
32 type RuntimeConstraints struct {
35 VCPUs int `json:"vcpus"`
38 // ContainerList is an arvados#containerList resource.
39 type ContainerList struct {
40 Items []Container `json:"items"`
41 ItemsAvailable int `json:"items_available"`
42 Offset int `json:"offset"`
43 Limit int `json:"limit"`
46 // ContainerState is a string corresponding to a valid Container state.
47 type ContainerState string
50 ContainerStateQueued = ContainerState("Queued")
51 ContainerStateLocked = ContainerState("Locked")
52 ContainerStateRunning = ContainerState("Running")
53 ContainerStateComplete = ContainerState("Complete")
54 ContainerStateCancelled = ContainerState("Cancelled")