1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
9 "git.arvados.org/arvados.git/sdk/go/arvados"
10 "golang.org/x/net/context"
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 // CID the container will belong to
57 // Stop the container immediately
60 // Release resources (temp dirs, stopped containers)
63 // Name of runtime engine ("docker", "singularity")