1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: Apache-2.0
7 // Container is an arvados#container resource.
8 type Container struct {
9 UUID string `json:"uuid"`
10 Command []string `json:"command"`
11 ContainerImage string `json:"container_image"`
12 Cwd string `json:"cwd"`
13 Environment map[string]string `json:"environment"`
14 LockedByUUID string `json:"locked_by_uuid"`
15 Mounts map[string]Mount `json:"mounts"`
16 Output string `json:"output"`
17 OutputPath string `json:"output_path"`
18 Priority int `json:"priority"`
19 RuntimeConstraints RuntimeConstraints `json:"runtime_constraints"`
20 State ContainerState `json:"state"`
21 SchedulingParameters SchedulingParameters `json:"scheduling_parameters"`
24 // Mount is special behavior to attach to a filesystem path or device.
26 Kind string `json:"kind"`
27 Writable bool `json:"writable"`
28 PortableDataHash string `json:"portable_data_hash"`
29 UUID string `json:"uuid"`
30 DeviceType string `json:"device_type"`
31 Path string `json:"path"`
32 Content interface{} `json:"content"`
33 ExcludeFromOutput bool `json:"exclude_from_output"`
34 Capacity int64 `json:"capacity"`
37 // RuntimeConstraints specify a container's compute resources (RAM,
38 // CPU) and network connectivity.
39 type RuntimeConstraints struct {
42 VCPUs int `json:"vcpus"`
43 KeepCacheRAM int `json:"keep_cache_ram"`
46 // SchedulingParameters specify a container's scheduling parameters
48 type SchedulingParameters struct {
49 Partitions []string `json:"partitions"`
52 // ContainerList is an arvados#containerList resource.
53 type ContainerList struct {
54 Items []Container `json:"items"`
55 ItemsAvailable int `json:"items_available"`
56 Offset int `json:"offset"`
57 Limit int `json:"limit"`
60 // ContainerState is a string corresponding to a valid Container state.
61 type ContainerState string
64 ContainerStateQueued = ContainerState("Queued")
65 ContainerStateLocked = ContainerState("Locked")
66 ContainerStateRunning = ContainerState("Running")
67 ContainerStateComplete = ContainerState("Complete")
68 ContainerStateCancelled = ContainerState("Cancelled")