0aad42f5cf
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
38 lines
755 B
Go
38 lines
755 B
Go
package execution
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/opencontainers/runtime-spec/specs-go"
|
|
)
|
|
|
|
type CreateOpts struct {
|
|
Bundle string
|
|
Console bool
|
|
Stdin string
|
|
Stdout string
|
|
Stderr string
|
|
}
|
|
|
|
type StartProcessOpts struct {
|
|
Spec specs.Process
|
|
Console bool
|
|
Stdin string
|
|
Stdout string
|
|
Stderr string
|
|
}
|
|
|
|
type Executor interface {
|
|
Create(id string, o CreateOpts) (*Container, error)
|
|
Pause(*Container) error
|
|
Resume(*Container) error
|
|
Status(*Container) (Status, error)
|
|
List() ([]*Container, error)
|
|
Load(id string) (*Container, error)
|
|
Delete(*Container) error
|
|
Start(*Container) error
|
|
|
|
StartProcess(*Container, StartProcessOpts) (Process, error)
|
|
SignalProcess(*Container, string, os.Signal) error
|
|
DeleteProcess(*Container, string) error
|
|
}
|