Documentation ¶
Overview ¶
Package extension provides an extension to the shim.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewExtension func(ctx context.Context, next TaskServiceExt, req *task.CreateTaskRequest) (TaskServiceExt, error)
NewExtension registers an extension constructor. It may return nil, nil to indicate that the extension should not handle this task request. Returning an error will fail the task request.
Functions ¶
This section is empty.
Types ¶
type Process ¶
type Process interface { process.Process // Restore restores the container from a snapshot. Restore(context.Context, *RestoreConfig) error }
Process extends process.Process with extra restore functionality.
type RestoreConfig ¶
RestoreConfig is the configuration for a restore request.
type RestoreRequest ¶
type RestoreRequest struct { Start task.StartRequest Conf RestoreConfig }
RestoreRequest is a request to restore a container. It extends task.StartRequest with restore functionality.
type TaskServiceExt ¶
type TaskServiceExt interface { task.TaskService Cleanup(ctx context.Context) (*task.DeleteResponse, error) Restore(ctx context.Context, req *RestoreRequest) (*task.StartResponse, error) }
TaskServiceExt extends TaskRequest with extra functionality required by the shim.
Click to show internal directories.
Click to hide internal directories.