1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
10 "git.arvados.org/arvados.git/sdk/go/arvados"
13 type bindmount struct {
18 type containerSpec struct {
24 BindMounts map[string]bindmount
28 NetworkMode string // docker network mode, normally "default"
35 // containerExecutor is an interface to a container runtime
36 // (docker/singularity).
37 type containerExecutor interface {
38 // ImageLoad loads the image from the given tarball such that
39 // it can be used to create/start a container.
40 LoadImage(imageID string, imageTarballPath string, container arvados.Container, keepMount string,
41 containerClient *arvados.Client) error
43 // Wait for the container process to finish, and return its
44 // exit code. If applicable, also remove the stopped container
46 Wait(context.Context) (int, error)
48 // Create a container, but don't start it yet.
49 Create(containerSpec) error
51 // Start the container
54 // Process ID of a process in the container. Return 0 if
55 // container is finished or no process has started yet.
58 // Stop the container immediately
61 // Release resources (temp dirs, stopped containers)
64 // Name and version of runtime engine ("docker 20.10.16", "singularity-ce version 3.9.9")