Add wait API endpoint for waiting on process exit

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-09-18 15:54:29 -04:00
parent 2f5dda6229
commit d67763d922
23 changed files with 1314 additions and 355 deletions

View File

@@ -38,7 +38,9 @@ type process interface {
// Stdio returns io information for the container
Stdio() stdio
// Status returns the process status
Status(ctx context.Context) (string, error)
Status(context.Context) (string, error)
// Wait blocks until the process has exited
Wait()
}
type processState interface {
@@ -58,7 +60,7 @@ func stateName(v interface{}) string {
switch v.(type) {
case *runningState, *execRunningState:
return "running"
case *createdState, *execCreatedState:
case *createdState, *execCreatedState, *createdCheckpointState:
return "created"
case *pausedState:
return "paused"