librunner

package
v0.7.1-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

This file is derived from opencontainers/runc/tty.go and opencontainers/runc/utils_linux.go (setupIO)

Index

Constants

View Source
const (
	RLIMIT_CPU        = iota // CPU time in sec
	RLIMIT_FSIZE             // Maximum filesize
	RLIMIT_DATA              // max data size
	RLIMIT_STACK             // max stack size
	RLIMIT_CORE              // max core file size
	RLIMIT_RSS               // max resident set size
	RLIMIT_NPROC             // max number of processes
	RLIMIT_NOFILE            // max number of open files
	RLIMIT_MEMLOCK           // max locked-in-memory address space
	RLIMIT_AS                // address space limit
	RLIMIT_LOCKS             // maximum file locks held
	RLIMIT_SIGPENDING        // max number of pending signals
	RLIMIT_MSGQUEUE          // maximum bytes in POSIX mqueues
	RLIMIT_NICE              // max nice prio allowed to raise to
	RLIMIT_RTPRIO            // maximum realtime priority
	RLIMIT_RTTIME            // timeout for RT tasks in us
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

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

func LoadContainer

func LoadContainer(id string, factory libcontainer.Factory, loggers log.Loggers) (*Container, error)

func NewContainer

func NewContainer(cfg *run.ContainerConfig, rootless bool, factory libcontainer.Factory, loggers log.Loggers) (r *Container, err error)

func (*Container) Close

func (c *Container) Close() (err error)

func (*Container) Destroy

func (c *Container) Destroy() (err error)

func (*Container) Exec

func (c *Container) Exec(process *specs.Process, io run.ContainerIO) (proc run.Process, err error)

func (*Container) ID

func (c *Container) ID() string

func (*Container) Rootfs

func (c *Container) Rootfs() string

func (*Container) Start

func (c *Container) Start() (err error)

Prepare and start the container process from spec and with stdio

func (*Container) Stop

func (c *Container) Stop()

func (*Container) Wait

func (c *Container) Wait() (err error)

Waits for the container process to terminate and returns the process' error if any

type ContainerManager

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

func NewContainerManager

func NewContainerManager(rootDir string, rootless bool, loggers log.Loggers) (r *ContainerManager, err error)

func (*ContainerManager) Exist

func (m *ContainerManager) Exist(id string) (e bool, err error)

func (*ContainerManager) Get

func (m *ContainerManager) Get(id string) (run.Container, error)

func (*ContainerManager) Kill

func (m *ContainerManager) Kill(id string, signal os.Signal, all bool) (err error)

func (*ContainerManager) List

func (m *ContainerManager) List() (r []run.ContainerInfo, err error)

func (*ContainerManager) NewContainer

func (m *ContainerManager) NewContainer(cfg *run.ContainerConfig) (c run.Container, err error)

type Process

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

func NewProcess

func NewProcess(container *Container, p *specs.Process, io run.ContainerIO, loggers log.Loggers) (r *Process, err error)

func (*Process) Close

func (p *Process) Close() (err error)

func (*Process) Start

func (p *Process) Start() (err error)

func (*Process) Stop

func (c *Process) Stop()

func (*Process) Wait

func (p *Process) Wait() (err error)

Waits for the container process to terminate and returns the process' error if any

Jump to

Keyboard shortcuts

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