types

package
v0.9.250 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: AGPL-3.0 Imports: 10 Imported by: 2

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 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 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      io.Storage
	DumpFs       afero.Fs
	FdStore      *sync.Map
}

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

Jump to

Keyboard shortcuts

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