containerd/runtime/runtime.go

25 lines
870 B
Go
Raw Normal View History

package runtime
2015-11-05 23:29:53 +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")
ErrCheckpointNotExists = errors.New("containerd: checkpoint does not exist for container")
ErrCheckpointExists = errors.New("containerd: checkpoint already exists")
ErrContainerExited = errors.New("containerd: container has exited")
)
// Runtime handles containers, containers handle their own actions
2015-11-05 23:29:53 +00:00
type Runtime interface {
// Create creates a new container initialized but without it starting it
2015-11-13 21:22:42 +00:00
Create(id, bundlePath string, stdio *Stdio) (Container, error)
// StartProcess adds a new process to the container
2015-11-13 21:22:42 +00:00
StartProcess(Container, specs.Process, *Stdio) (Process, error)
Type() string
2015-11-05 23:29:53 +00:00
}