Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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, ServerOpts, *RESP, *REQ) (exited chan int, err error)
type Middleware ¶ added in v0.9.237
A middleware is simply a chain of adapters
type Restore ¶ added in v0.9.237
type Restore = Handler[daemon.RestoreReq, daemon.RestoreResp]
type ServerOpts ¶
type ServerOpts struct {
WG *sync.WaitGroup
CRIU *criu.Criu
CRIUCallback *criu.NotifyCallbackMulti
Plugins plugins.Manager
Lifetime context.Context
}
ServerOpts 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.
Click to show internal directories.
Click to hide internal directories.