move work on execution service
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
parent
dd5f74edec
commit
c857213b4c
15 changed files with 596 additions and 1016 deletions
|
@ -1,6 +1,11 @@
|
|||
package execution
|
||||
|
||||
import "io"
|
||||
import (
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/opencontainers/runtime-spec/specs-go"
|
||||
)
|
||||
|
||||
type CreateOpts struct {
|
||||
Bundle string
|
||||
|
@ -9,9 +14,23 @@ type CreateOpts struct {
|
|||
Stderr io.Writer
|
||||
}
|
||||
|
||||
type CreateProcessOpts struct {
|
||||
Spec specs.Process
|
||||
Stdin io.Reader
|
||||
Stdout io.Writer
|
||||
Stderr io.Writer
|
||||
}
|
||||
|
||||
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(string) error
|
||||
Delete(*Container) error
|
||||
|
||||
StartProcess(*Container, CreateProcessOpts) (Process, error)
|
||||
SignalProcess(*Container, os.Signal) error
|
||||
DeleteProcess(*Container, string) error
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue