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"`
36 KeepCacheRAM int `json:"keep_cache_ram"`
37 Partition []string `json:"partition"`
40 // ContainerList is an arvados#containerList resource.
41 type ContainerList struct {
42 Items []Container `json:"items"`
43 ItemsAvailable int `json:"items_available"`
44 Offset int `json:"offset"`
45 Limit int `json:"limit"`
48 // ContainerState is a string corresponding to a valid Container state.
49 type ContainerState string
52 ContainerStateQueued = ContainerState("Queued")
53 ContainerStateLocked = ContainerState("Locked")
54 ContainerStateRunning = ContainerState("Running")
55 ContainerStateComplete = ContainerState("Complete")
56 ContainerStateCancelled = ContainerState("Cancelled")