extension

package
v0.0.0-...-65a7fdf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2024 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Overview

Package extension provides an extension to the shim.

Index

Constants

This section is empty.

Variables

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

type RestoreConfig struct {
	ImagePath  string
	Direct     bool
	Background bool
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL