21021: Merge branch 'main' into 21021-controller-logout
[arvados.git] / lib / crunchrun / executor.go
index 0a65f4d63466e840c8e2ff39dfa9614cf01fafce..308b05cdeb33b529d46564658cdb5c6dcfc8b1af 100644 (file)
@@ -4,10 +4,10 @@
 package crunchrun
 
 import (
+       "context"
        "io"
 
        "git.arvados.org/arvados.git/sdk/go/arvados"
-       "golang.org/x/net/context"
 )
 
 type bindmount struct {
@@ -51,8 +51,9 @@ type containerExecutor interface {
        // Start the container
        Start() error
 
-       // CID the container will belong to
-       CgroupID() string
+       // Process ID of a process in the container.  Return 0 if
+       // container is finished or no process has started yet.
+       Pid() int
 
        // Stop the container immediately
        Stop() error
@@ -62,4 +63,6 @@ type containerExecutor interface {
 
        // Name and version of runtime engine ("docker 20.10.16", "singularity-ce version 3.9.9")
        Runtime() string
+
+       GatewayTarget
 }