types

package
v0.9.280 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2025 License: AGPL-3.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attachable added in v0.9.276

func Attachable[REQ any](req *REQ) bool

func Details added in v0.9.273

func Details[REQ any](req *REQ) *daemon.Details

func GID added in v0.9.276

func GID[REQ any](req *REQ) uint32

func Log added in v0.9.276

func Log[REQ any](req *REQ) string

func PID added in v0.9.276

func PID[RESP any](resp *RESP) uint32

func SetPID added in v0.9.276

func SetPID[RESP any](resp *RESP, pid uint32)

func UID added in v0.9.276

func UID[REQ any](req *REQ) uint32

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 Checklist added in v0.9.237

type Checklist []Checks

A list of checks

func (Checklist) Run added in v0.9.237

Run runs all checks in the list, and returns the result

type Checks added in v0.9.237

type Checks struct {
	Name string
	List []Check
}

Represents a named list of checks

func (*Checks) Run added in v0.9.237

Run runs every check in the list, and returns the result

func (*Checks) String added in v0.9.237

func (c *Checks) String() string

type Dump added in v0.9.237

type DumpVM added in v0.9.242

type Freeze added in v0.9.263

type Handler added in v0.9.237

type Handler[REQ, RESP any] func(context.Context, Opts, *RESP, *REQ) (code func() <-chan int, err error)

func Timer added in v0.9.237

func Timer[REQ, RESP any](next Handler[REQ, RESP]) Handler[REQ, RESP]

Generic profiler for recording timing information. Populates the profiling data for the next handler.

func (Handler[REQ, RESP]) With added in v0.9.237

func (h Handler[REQ, RESP]) With(middleware ...Adapter[Handler[REQ, RESP]]) Handler[REQ, RESP]

With applies the given middleware to the handler. When profiling is enabled, a timing profiler is added to the middleware chain.

type Middleware added in v0.9.237

type Middleware[H any] []Adapter[H]

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 Query added in v0.9.237

type Query = func(context.Context, *daemon.QueryReq) (*daemon.QueryResp, error)

type Restore added in v0.9.237

type RestoreVM added in v0.9.242

type Run added in v0.9.237

type Unfreeze added in v0.9.263

type Unfreeze = Handler[daemon.DumpReq, daemon.DumpResp]

Jump to

Keyboard shortcuts

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