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
27 NetworkMode string // docker network mode, normally "default"
34 // containerExecutor is an interface to a container runtime
35 // (docker/singularity).
36 type containerExecutor interface {
37 // ImageLoad loads the image from the given tarball such that
38 // it can be used to create/start a container.
39 LoadImage(imageID string, imageTarballPath string, container arvados.Container, keepMount string,
40 containerClient *arvados.Client) error
42 // Wait for the container process to finish, and return its
43 // exit code. If applicable, also remove the stopped container
45 Wait(context.Context) (int, error)
47 // Create a container, but don't start it yet.
48 Create(containerSpec) error
50 // Start the container
53 // CID the container will belong to
56 // Stop the container immediately
59 // Release resources (temp dirs, stopped containers)
62 // Name of runtime engine ("docker", "singularity")