container

package
v0.9.237-pre.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 License: AGPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RUNC_BINARY    = "runc"
	RUNC_LOG_FILE  = "runc.log"
	RUNC_LOG_DEBUG = true
)
View Source
const StateFile = "state.json"

Variables

View Source
var (
	Run    types.Run = run
	Manage types.Run = manage
)

Functions

func CheckBinary

func CheckBinary() types.Check

Checks if the runc binary is available

func CheckVersion

func CheckVersion() types.Check

CheckVersion checks the versions associated with the runc binary

func CreateContainerForRestore

func CreateContainerForRestore(next types.Restore) types.Restore

func GetContainerForDump

func GetContainerForDump(next types.Dump) types.Dump

func GetStdioFds

func GetStdioFds(pid int32) ([]string, error)

lifted from libcontainer -> getPipeFds

func LoadSpecFromBundle

func LoadSpecFromBundle(next types.Run) types.Run

LoadSpecFromBundle loads the spec from the bundle path, and sets it in the context

func LoadSpecFromBundleForRestore

func LoadSpecFromBundleForRestore(next types.Restore) types.Restore

LoadSpecFromBundleForRestore loads the spec from the bundle path, and sets it in the context

func Query

func Query(ctx context.Context, req *daemon.QueryReq) (*daemon.QueryResp, error)

func RunHooksOnRestore

func RunHooksOnRestore(next types.Restore) types.Restore

Adds CRIU callback to run the prestart and create runtime hooks before the namespaces are setup during restore

func RuncLogMsgToString

func RuncLogMsgToString(b []byte) (string, error)

func SaveState

func SaveState(root string, id string, state *libcontainer.State) (err error)

func SetPIDForDump

func SetPIDForDump(next types.Dump) types.Dump

func SetUsChildSubreaper

func SetUsChildSubreaper(next types.Run) types.Run

SetUsChildSubreaper sets the current process as the child subreaper

func UpdateStateOnRestore

func UpdateStateOnRestore(next types.Restore) types.Restore

UpdateStateOnRestore updates the container state after restore Without this, runc won't be able to 'detect' the container

Types

type RuncLogMsg

type RuncLogMsg struct {
	Msg   string `json:"msg"`
	Level string `json:"level"`
	Time  string `json:"time"`
}

type RuncState

type RuncState struct {
	ID  string `json:"id"`
	PID int    `json:"pid"`
}

Jump to

Keyboard shortcuts

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