2017-01-12 18:29:37 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2017-01-24 00:18:10 +00:00
|
|
|
"context"
|
2017-01-12 18:29:37 +00:00
|
|
|
"errors"
|
2017-01-24 00:18:10 +00:00
|
|
|
|
|
|
|
runc "github.com/crosbymichael/go-runc"
|
2017-01-12 18:29:37 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var errRuntime = errors.New("shim: runtime execution error")
|
|
|
|
|
2017-01-24 00:18:10 +00:00
|
|
|
type process interface {
|
|
|
|
// Pid returns the pid for the process
|
|
|
|
Pid() int
|
|
|
|
// Start starts the user's defined process inside
|
|
|
|
Start(context.Context) error
|
|
|
|
// Delete deletes the process and closes all open pipes
|
|
|
|
Delete(context.Context) error
|
|
|
|
// Resize resizes the process console
|
|
|
|
Resize(ws runc.WinSize) error
|
|
|
|
// Exited sets the exit status for the process
|
|
|
|
Exited(status int)
|
|
|
|
// Status returns the exit status
|
|
|
|
Status() int
|
2017-01-12 18:29:37 +00:00
|
|
|
}
|