projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
17813: Refactor singularity image loading / caching / conversion
[arvados.git]
/
lib
/
crunchrun
/
executor.go
diff --git
a/lib/crunchrun/executor.go
b/lib/crunchrun/executor.go
index c773febe94dda6b1866cc7e5fb26ce2726750328..787edda010a139954fcb2731da7e807de9933c7f 100644
(file)
--- a/
lib/crunchrun/executor.go
+++ b/
lib/crunchrun/executor.go
@@
-6,6
+6,7
@@
package crunchrun
import (
"io"
import (
"io"
+ "git.arvados.org/arvados.git/sdk/go/arvados"
"golang.org/x/net/context"
)
"golang.org/x/net/context"
)
@@
-25,21
+26,18
@@
type containerSpec struct {
EnableNetwork bool
NetworkMode string // docker network mode, normally "default"
CgroupParent string
EnableNetwork bool
NetworkMode string // docker network mode, normally "default"
CgroupParent string
- Stdin io.Read
Clos
er
- Stdout io.Write
Close
r
- Stderr io.Write
Close
r
+ Stdin io.Reader
+ Stdout io.Writer
+ Stderr io.Writer
}
// containerExecutor is an interface to a container runtime
// (docker/singularity).
type containerExecutor interface {
}
// containerExecutor is an interface to a container runtime
// (docker/singularity).
type containerExecutor interface {
- // ImageLoaded determines whether the given image is already
- // available to use without calling ImageLoad.
- ImageLoaded(imageID string) bool
-
// ImageLoad loads the image from the given tarball such that
// it can be used to create/start a container.
// ImageLoad loads the image from the given tarball such that
// it can be used to create/start a container.
- LoadImage(filename string) error
+ LoadImage(imageID string, container arvados.Container, keepMount string,
+ containerClient *arvados.Client, keepClient IKeepClient) error
// Wait for the container process to finish, and return its
// exit code. If applicable, also remove the stopped container
// Wait for the container process to finish, and return its
// exit code. If applicable, also remove the stopped container