container

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// https://github.com/util-linux/util-linux/blob/master/include/loopdev.h#L46
	LOOP_SET_FD       = 0x4C00
	LOOP_CLR_FD       = 0x4C01
	LOOP_SET_STATUS64 = 0x4C04
	LOOP_CTL_ADD      = 0x4C80
	LOOP_CTL_REMOVE   = 0x4C81
	LOOP_CTL_GET_FREE = 0x4C82

	LOOP_DEVICE_PREFIX = "/dev/loop"
)
View Source
const (
	ContainerStatusCreating = "creating"
	ContainerStatusRunning  = "running"
	ContainerStatusStopped  = "stopped"
	ContainerStatusHang     = "hang"
)
View Source
const (
	CHILD_CONFIG_ENV_NAME = "SANDAL_CHILD"
)

Variables

View Source
var ErrPidExistenceControl = fmt.Errorf("unable to find proccess")

Functions

func AttachContainerToPID

func AttachContainerToPID(c *config.Config, masterPid int) error

func AttachLoopDevice

func AttachLoopDevice(loopDev int, file *os.File) error

func ChangeDir

func ChangeDir(c *config.Config) changesDir

func CheckExistence

func CheckExistence(c *config.Config) error

func DetachLoopDevice

func DetachLoopDevice(loopDev int) error

func Exec

func Exec()

func FindFreeLoopDevice

func FindFreeLoopDevice() (int, error)

find free loop device

func IsChild

func IsChild() bool

func IsPidRunning added in v1.1.0

func IsPidRunning(pid int) (bool, error)

func IsRunning

func IsRunning(c *config.Config) bool

func MountRootfs

func MountRootfs(c *config.Config) error

func SendSig added in v1.1.0

func SendSig(pid, sig int) error

func Start

func Start(c *config.Config, args []string) (int, error)

func Touch added in v1.4.0

func Touch(path string) error

func UmountRootfs

func UmountRootfs(c *config.Config) []error

Types

This section is empty.

Jump to

Keyboard shortcuts

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