2015-12-01 19:56:08 +00:00
|
|
|
package runtime
|
2015-11-05 23:29:53 +00:00
|
|
|
|
2015-12-01 20:00:11 +00:00
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
|
|
|
|
"github.com/opencontainers/specs"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
ErrNotChildProcess = errors.New("containerd: not a child process for container")
|
|
|
|
ErrInvalidContainerType = errors.New("containerd: invalid container type for runtime")
|
|
|
|
)
|
2015-11-10 22:57:10 +00:00
|
|
|
|
2015-11-05 23:29:53 +00:00
|
|
|
// runtime handles containers, containers handle their own actions.
|
|
|
|
type Runtime interface {
|
2015-11-13 21:22:42 +00:00
|
|
|
Create(id, bundlePath string, stdio *Stdio) (Container, error)
|
|
|
|
StartProcess(Container, specs.Process, *Stdio) (Process, error)
|
2015-11-05 23:29:53 +00:00
|
|
|
}
|