2016-12-02 23:37:16 +00:00
|
|
|
package execution
|
|
|
|
|
2016-12-05 22:15:03 +00:00
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/opencontainers/runtime-spec/specs-go"
|
|
|
|
)
|
2016-12-02 23:37:16 +00:00
|
|
|
|
|
|
|
type CreateOpts struct {
|
2016-12-09 17:17:34 +00:00
|
|
|
Bundle string
|
|
|
|
Console bool
|
|
|
|
Stdin string
|
|
|
|
Stdout string
|
|
|
|
Stderr string
|
2016-12-02 23:37:16 +00:00
|
|
|
}
|
|
|
|
|
2016-12-09 17:17:34 +00:00
|
|
|
type StartProcessOpts struct {
|
|
|
|
Spec specs.Process
|
|
|
|
Console bool
|
|
|
|
Stdin string
|
|
|
|
Stdout string
|
|
|
|
Stderr string
|
2016-12-05 22:15:03 +00:00
|
|
|
}
|
|
|
|
|
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
|
2016-12-05 23:38:32 +00:00
|
|
|
Start(*Container) error
|
2016-12-05 22:15:03 +00:00
|
|
|
|
2016-12-09 17:17:34 +00:00
|
|
|
StartProcess(*Container, StartProcessOpts) (Process, error)
|
2016-12-06 00:17:46 +00:00
|
|
|
SignalProcess(*Container, string, os.Signal) error
|
2016-12-05 22:15:03 +00:00
|
|
|
DeleteProcess(*Container, string) error
|
2016-12-02 23:37:16 +00:00
|
|
|
}
|