Pass context down to executors

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure 2016-12-09 10:00:30 -08:00
parent 0aad42f5cf
commit 4157d1adfd
3 changed files with 53 additions and 51 deletions

View file

@ -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
}