Documentation ¶
Overview ¶
credit: https://github.com/opencontainers/runc
credit: https://github.com/opencontainers/runc
Index ¶
- Constants
- Variables
- func Destroy(container libcontainer.Container)
- func GetContainer(root, id string) (libcontainer.Container, error)
- func GetSubCgroupPaths(args []string) (map[string]string, error)
- func NewProcess(p specs.Process) (*libcontainer.Process, error)
- func NotifySocketStart(root, notifySocketPath, id string) (*notifySocket, error)
- func ParseSignal(sigstr string) (unix.Signal, error)
- func ReviseStateDir(state string) (path string, err error)
- func ShouldHonorXDGRuntimeDir() bool
- func ShouldUseRootlessCgroups(rootless string, systemdCg bool) (bool, error)
- type ConstainerState
- type FactoryOpts
- type ProcessOpts
- type Runner
Constants ¶
View Source
const ( ACT_CREATE action = iota + 1 ACT_RUN )
Variables ¶
View Source
var RlimitMap = map[string]int{ "RLIMIT_CPU": unix.RLIMIT_CPU, "RLIMIT_FSIZE": unix.RLIMIT_FSIZE, "RLIMIT_DATA": unix.RLIMIT_DATA, "RLIMIT_STACK": unix.RLIMIT_STACK, "RLIMIT_CORE": unix.RLIMIT_CORE, "RLIMIT_RSS": unix.RLIMIT_RSS, "RLIMIT_NPROC": unix.RLIMIT_NPROC, "RLIMIT_NOFILE": unix.RLIMIT_NOFILE, "RLIMIT_MEMLOCK": unix.RLIMIT_MEMLOCK, "RLIMIT_AS": unix.RLIMIT_AS, "RLIMIT_LOCKS": unix.RLIMIT_LOCKS, "RLIMIT_SIGPENDING": unix.RLIMIT_SIGPENDING, "RLIMIT_MSGQUEUE": unix.RLIMIT_MSGQUEUE, "RLIMIT_NICE": unix.RLIMIT_NICE, "RLIMIT_RTPRIO": unix.RLIMIT_RTPRIO, "RLIMIT_RTTIME": unix.RLIMIT_RTTIME, }
Functions ¶
func Destroy ¶
func Destroy(container libcontainer.Container)
func GetContainer ¶
func GetContainer(root, id string) (libcontainer.Container, error)
func NewProcess ¶
func NewProcess(p specs.Process) (*libcontainer.Process, error)
func NotifySocketStart ¶
func ReviseStateDir ¶
func ShouldHonorXDGRuntimeDir ¶
func ShouldHonorXDGRuntimeDir() bool
Types ¶
type ConstainerState ¶
type ConstainerState struct { Version string `json:"ociVersion"` ID string `json:"id"` InitPid int `json:"pid"` Status string `json:"status"` Bundle string `json:"bundle"` Rootfs string `json:"rootfs"` Created time.Time `json:"created"` Annotations map[string]string `json:"annotations,omitempty"` Owner string `json:"owner"` }
func GetContainers ¶
func GetContainers(statePath string) ([]ConstainerState, error)
type FactoryOpts ¶
type FactoryOpts struct { UseSystemdCgroup bool NoPivotRoot bool NoNewKeyring bool Rootless string }
func (*FactoryOpts) CreateContainer ¶
func (f *FactoryOpts) CreateContainer(state string, id string, spec *specs.Spec) (libcontainer.Container, error)
type ProcessOpts ¶
type ProcessOpts struct { Process string Cwd string Apparmour string ProcessLabel string Cap []string Env []string Args []string Cgroups []string Tty bool NoNewPrivs bool IgnorePaused bool User string AdditionalGids []int64 }
func (*ProcessOpts) GetProcess ¶
func (pp *ProcessOpts) GetProcess(bundle string) (*specs.Process, error)
type Runner ¶
type Runner struct { FactoryOpts ProcessOpts EnableSubreaper bool ShouldDestroy bool PreserveFDS int PidFile string ConsoleSocket string Detach bool // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.