v5 – github.com/checkpoint-restore/go-criu/v5 Index | Files | Directories

package criu

import "github.com/checkpoint-restore/go-criu/v5"

Index

Types

type Criu

type Criu struct {
	// contains filtered or unexported fields
}

Criu struct

func MakeCriu

func MakeCriu() *Criu

MakeCriu returns the Criu object required for most operations

func (*Criu) Cleanup

func (c *Criu) Cleanup()

Cleanup cleans up

func (*Criu) Dump

func (c *Criu) Dump(opts *rpc.CriuOpts, nfy Notify) error

Dump dumps a process

func (*Criu) FeatureCheck

func (c *Criu) FeatureCheck(features *rpc.CriuFeatures) (*rpc.CriuFeatures, error)

func (*Criu) GetCriuVersion

func (c *Criu) GetCriuVersion() (int, error)

GetCriuVersion executes the VERSION RPC call and returns the version as an integer. Major * 10000 + Minor * 100 + SubLevel

func (*Criu) IsCriuAtLeast

func (c *Criu) IsCriuAtLeast(version int) (bool, error)

IsCriuAtLeast checks if the version is at least the same as the parameter version

func (*Criu) PreDump

func (c *Criu) PreDump(opts *rpc.CriuOpts, nfy Notify) error

PreDump does a pre-dump

func (*Criu) Prepare

func (c *Criu) Prepare() error

Prepare sets up everything for the RPC communication to CRIU

func (*Criu) Restore

func (c *Criu) Restore(opts *rpc.CriuOpts, nfy Notify) error

Restore restores a process

func (*Criu) SetCriuPath

func (c *Criu) SetCriuPath(path string)

SetCriuPath allows setting the path to the CRIU binary if it is in a non standard location

func (*Criu) StartPageServer

func (c *Criu) StartPageServer(opts *rpc.CriuOpts) error

StartPageServer starts the page server

func (*Criu) StartPageServerChld

func (c *Criu) StartPageServerChld(opts *rpc.CriuOpts) (int, int, error)

StartPageServerChld starts the page server and returns PID and port

type NoNotify

type NoNotify struct{}

NoNotify struct

func (NoNotify) NetworkLock

func (c NoNotify) NetworkLock() error

NetworkLock NoNotify

func (NoNotify) NetworkUnlock

func (c NoNotify) NetworkUnlock() error

NetworkUnlock NoNotify

func (NoNotify) PostDump

func (c NoNotify) PostDump() error

PostDump NoNotify

func (NoNotify) PostRestore

func (c NoNotify) PostRestore(pid int32) error

PostRestore NoNotify

func (NoNotify) PostResume

func (c NoNotify) PostResume() error

PostResume NoNotify

func (NoNotify) PostSetupNamespaces

func (c NoNotify) PostSetupNamespaces() error

PostSetupNamespaces NoNotify

func (NoNotify) PreDump

func (c NoNotify) PreDump() error

PreDump NoNotify

func (NoNotify) PreRestore

func (c NoNotify) PreRestore() error

PreRestore NoNotify

func (NoNotify) SetupNamespaces

func (c NoNotify) SetupNamespaces(pid int32) error

SetupNamespaces NoNotify

type Notify

type Notify interface {
	PreDump() error
	PostDump() error
	PreRestore() error
	PostRestore(pid int32) error
	NetworkLock() error
	NetworkUnlock() error
	SetupNamespaces(pid int32) error
	PostSetupNamespaces() error
	PostResume() error
}

Notify interface

Source Files

features.go main.go notify.go

Directories

PathSynopsis
magic
phaul
rpc
stats
test
test/phaul
Version
v5.3.0 (latest)
Published
Dec 19, 2021
Platform
linux/amd64
Imports
8 packages
Last checked
2 weeks ago

Tools for package owners.