Documentation
¶
Index ¶
- func Attachable[REQ any](req *REQ) bool
- func Details[REQ any](req *REQ) *daemon.Details
- func GID[REQ any](req *REQ) uint32
- func Log[REQ any](req *REQ) string
- func PID[RESP any](resp *RESP) uint32
- func SetPID[RESP any](resp *RESP, pid uint32)
- func UID[REQ any](req *REQ) uint32
- type Adapter
- type Check
- type Checklist
- type Checks
- type Dump
- type DumpVM
- type Freeze
- type Handler
- type Middleware
- type Opts
- type Query
- type Restore
- type RestoreVM
- type Run
- type Unfreeze
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Attachable ¶ added in v0.9.276
Types ¶
type Adapter ¶ added in v0.9.237
type Adapter[H any] func(H) H
An adapter is a function that takes a Handler and returns a new Handler
type Check ¶ added in v0.9.237
type Check = func(context.Context) []*daemon.HealthCheckComponent
A health check function that returns a list of components A health check if never supposed to return an error. If it wants to, it should simply add the failure information to the components.
type Checks ¶ added in v0.9.237
Represents a named list of checks
type Handler ¶ added in v0.9.237
type Handler[REQ, RESP any] func(context.Context, Opts, *RESP, *REQ) (code func() <-chan int, err error)
type Middleware ¶ added in v0.9.237
A middleware is simply a chain of adapters
type Opts ¶ added in v0.9.237
type Opts struct {
WG *sync.WaitGroup
CRIU *criu.Criu
CRIUCallback *criu.NotifyCallbackMulti
Plugins plugins.Manager
Lifetime context.Context
Storage cedana_io.Storage // Direct R/W access to underlying storage of the dump (use DumpFs instead)
DumpFs afero.Fs // Full filesystem to use for any dump/restore operations
FdStore *sync.Map
Serverless bool // Whether the operation is being performed in serverless mode
IO struct {
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
}
ExtraFiles []*os.File
InheritFdMap map[string]int32
}
Opts is intended to be passed by **value** to each handler, so that each handler can modify it before passing it to the next handler in the chain, without affecting the original value.
type Restore ¶ added in v0.9.237
type Restore = Handler[daemon.RestoreReq, daemon.RestoreResp]
type RestoreVM ¶ added in v0.9.242
type RestoreVM = Handler[daemon.RestoreVMReq, daemon.RestoreVMResp]
Click to show internal directories.
Click to hide internal directories.