# README
go-runc
This is a package for consuming the runc binary in your Go applications. It tries to expose all the settings and features of the runc CLI. If there is something missing then add it, its opensource!
This needs runc @ a9610f2c0 or greater.
Docs
Docs can be found at godoc.org.
Project details
The go-runc is a containerd sub-project, licensed under the Apache 2.0 license. As a containerd sub-project, you will find the:
information in our containerd/project
repository.
# Functions
LeaveRunning keeps the container running after the checkpoint has been completed.
NewConsoleSocket creates a new unix socket at the provided path to accept a pty master created by runc for use by the container.
NewNullIO returns IO setup for /dev/null use with runc.
NewPipeIO creates pipe pairs to be used with runc.
NewSTDIO returns I/O setup for standard OS in/out/err usage.
NewTempConsoleSocket returns a temp console socket for use with a container On Close(), the socket is deleted.
ParsePSOutput parses the runtime's ps raw output and returns a TopResults.
PreDump allows a pre-dump of the checkpoint to be made and completed later.
ReadPidFile reads the pid file at the provided path and returns the pid or an error if the read and conversion is unsuccessful.
# Variables
DefaultCommand is the default command for Runc.
ErrParseRuncVersion is used when the runc version can't be parsed.
Monitor is the default ProcessMonitor for handling runc process exit.
# Structs
Blkio represents the statistical information from block IO devices.
BlkioEntry represents a block IO entry in the IO stats.
CheckpointOpts holds the options for performing a criu checkpoint using runc.
Container hold information for a runc container.
Cpu represents the CPU usage and throttling statistics
revive:disable-next-line.
CpuUsage represents the CPU usage statistics
revive:disable-next-line.
CreateOpts holds all the options information for calling runc with supported options.
DeleteOpts holds the deletion options for calling `runc delete`.
Event is a struct to pass runc event information.
ExecOpts holds optional settings when starting an exec process with runc.
Exit holds the exit information from a process.
ExitError holds the status return code when a process exits with an error code.
Hugetlb represents the detailed hugetlb component of the statistics data.
IOOption holds I/O creation options.
KillOpts specifies options for killing a container and its processes.
Memory represents the collection of memory statistics from the process.
MemoryEntry represents an item in the memory use/statistics.
Pids represents the process ID information.
RestoreOpts holds the options for performing a criu restore using runc.
Runc is the client to the runc cli.
Socket is a unix socket that accepts the pty master created by runc.
Stats is statistical information from the runc process.
Throttling represents the throttling statistics.
TopResults represents the structured data of the full ps output.
Version represents the runc version information.
# Interfaces
ConsoleSocket handles the path of the socket for console access.
IO is the terminal IO interface.
ProcessMonitor is an interface for process monitoring.
StartCloser is an interface to handle IO closure after start.
# Type aliases
CgroupMode defines the cgroup mode used for checkpointing.
CheckpointAction represents specific actions executed during checkpoint/restore.
Format is the type of log formatting options available.
IOOpt sets I/O creation options.