Pass context down to executors
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
parent
0aad42f5cf
commit
4157d1adfd
3 changed files with 53 additions and 51 deletions
|
@ -1,6 +1,7 @@
|
|||
package execution
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
|
||||
"github.com/opencontainers/runtime-spec/specs-go"
|
||||
|
@ -23,16 +24,16 @@ type StartProcessOpts struct {
|
|||
}
|
||||
|
||||
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
|
||||
Create(ctx context.Context, id string, o CreateOpts) (*Container, error)
|
||||
Pause(context.Context, *Container) error
|
||||
Resume(context.Context, *Container) error
|
||||
Status(context.Context, *Container) (Status, error)
|
||||
List(context.Context) ([]*Container, error)
|
||||
Load(ctx context.Context, id string) (*Container, error)
|
||||
Delete(context.Context, *Container) error
|
||||
Start(context.Context, *Container) error
|
||||
|
||||
StartProcess(*Container, StartProcessOpts) (Process, error)
|
||||
SignalProcess(*Container, string, os.Signal) error
|
||||
DeleteProcess(*Container, string) error
|
||||
StartProcess(context.Context, *Container, StartProcessOpts) (Process, error)
|
||||
SignalProcess(ctx context.Context, c *Container, id string, sig os.Signal) error
|
||||
DeleteProcess(ctx context.Context, c *Container, id string) error
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue