2016-12-02 23:37:16 +00:00
|
|
|
package execution
|
|
|
|
|
2016-12-05 22:15:03 +00:00
|
|
|
import (
|
|
|
|
"io"
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/opencontainers/runtime-spec/specs-go"
|
|
|
|
)
|
2016-12-02 23:37:16 +00:00
|
|
|
|
|
|
|
type CreateOpts struct {
|
|
|
|
Bundle string
|
|
|
|
Stdin io.Reader
|
|
|
|
Stdout io.Writer
|
|
|
|
Stderr io.Writer
|
|
|
|
}
|
|
|
|
|
2016-12-05 22:15:03 +00:00
|
|
|
type CreateProcessOpts struct {
|
|
|
|
Spec specs.Process
|
|
|
|
Stdin io.Reader
|
|
|
|
Stdout io.Writer
|
|
|
|
Stderr io.Writer
|
|
|
|
}
|
|
|
|
|
2016-12-02 23:37:16 +00:00
|
|
|
type Executor interface {
|
|
|
|
Create(id string, o CreateOpts) (*Container, error)
|
2016-12-05 22:15:03 +00:00
|
|
|
Pause(*Container) error
|
|
|
|
Resume(*Container) error
|
|
|
|
Status(*Container) (Status, error)
|
2016-12-02 23:37:16 +00:00
|
|
|
List() ([]*Container, error)
|
|
|
|
Load(id string) (*Container, error)
|
2016-12-05 22:15:03 +00:00
|
|
|
Delete(*Container) error
|
|
|
|
|
|
|
|
StartProcess(*Container, CreateProcessOpts) (Process, error)
|
|
|
|
SignalProcess(*Container, os.Signal) error
|
|
|
|
DeleteProcess(*Container, string) error
|
2016-12-02 23:37:16 +00:00
|
|
|
}
|