Versions in this module Expand all Collapse all v1 v1.1.0 Apr 24, 2018 Changes in this version + const TaskCheckpointedEventTopic + const TaskCreateEventTopic + const TaskDeleteEventTopic + const TaskExecAddedEventTopic + const TaskExecStartedEventTopic + const TaskExitEventTopic + const TaskOOMEventTopic + const TaskPausedEventTopic + const TaskResumedEventTopic + const TaskStartEventTopic + const TaskUnknownTopic + var ErrTaskAlreadyExists = errors.New("task already exists") + var ErrTaskNotExists = errors.New("task does not exist") + type ConsoleSize struct + Height uint32 + Width uint32 + type CreateOpts struct + Checkpoint string + IO IO + Options *types.Any + Rootfs []mount.Mount + Spec *types.Any + type ExecOpts struct + IO IO + Spec *types.Any + type Exit struct + Pid uint32 + Status uint32 + Timestamp time.Time + type IO struct + Stderr string + Stdin string + Stdout string + Terminal bool + type Process interface + CloseIO func(context.Context) error + ID func() string + Kill func(context.Context, uint32, bool) error + ResizePty func(context.Context, ConsoleSize) error + Start func(context.Context) error + State func(context.Context) (State, error) + Wait func(context.Context) (*Exit, error) + type ProcessInfo struct + Info interface{} + Pid uint32 + type Runtime interface + Create func(ctx context.Context, id string, opts CreateOpts) (Task, error) + Delete func(context.Context, Task) (*Exit, error) + Get func(context.Context, string) (Task, error) + ID func() string + Tasks func(context.Context) ([]Task, error) + type State struct + ExitStatus uint32 + ExitedAt time.Time + Pid uint32 + Status Status + Stderr string + Stdin string + Stdout string + Terminal bool + type Status int + const CreatedStatus + const DeletedStatus + const PausedStatus + const PausingStatus + const RunningStatus + const StoppedStatus + type Task interface + Checkpoint func(context.Context, string, *types.Any) error + DeleteProcess func(context.Context, string) (*Exit, error) + Exec func(context.Context, string, ExecOpts) (Process, error) + Info func() TaskInfo + Metrics func(context.Context) (interface{}, error) + Pause func(context.Context) error + Pids func(context.Context) ([]ProcessInfo, error) + Process func(context.Context, string) (Process, error) + Resume func(context.Context) error + Update func(context.Context, *types.Any) error + type TaskInfo struct + ID string + Namespace string + Runtime string + Spec []byte + type TaskList struct + func NewTaskList() *TaskList + func (l *TaskList) Add(ctx context.Context, t Task) error + func (l *TaskList) AddWithNamespace(namespace string, t Task) error + func (l *TaskList) Delete(ctx context.Context, id string) + func (l *TaskList) Get(ctx context.Context, id string) (Task, error) + func (l *TaskList) GetAll(ctx context.Context) ([]Task, error) + type TaskMonitor interface + Monitor func(Task) error + Stop func(Task) error + func NewMultiTaskMonitor(monitors ...TaskMonitor) TaskMonitor + func NewNoopMonitor() TaskMonitor v1.1.0-rc.2 Apr 13, 2018 v1.1.0-rc.1 Apr 5, 2018 v1.1.0-rc.0 Mar 27, 2018