runc

package
v1.3.0-beta.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTopic added in v1.3.0

func GetTopic(e interface{}) string

GetTopic converts an event from an interface type to the specific event topic id

func NewPlatform added in v1.3.0

func NewPlatform() (stdio.Platform, error)

NewPlatform returns a linux platform for use with I/O operations

func ReadRuntime added in v1.3.0

func ReadRuntime(path string) (string, error)

ReadRuntime reads the runtime information from the path

func WriteRuntime added in v1.3.0

func WriteRuntime(path, runtime string) error

WriteRuntime writes the runtime information into the path

Types

type Container added in v1.3.0

type Container struct {

	// ID of the container
	ID string
	// Bundle path
	Bundle string
	// contains filtered or unexported fields
}

Container for operating on a runc container and its processes

func NewContainer added in v1.3.0

func NewContainer(ctx context.Context, platform stdio.Platform, r *task.CreateTaskRequest) (*Container, error)

NewContainer returns a new runc container

func (*Container) All added in v1.3.0

func (c *Container) All() (o []process.Process)

All processes in the container

func (*Container) Cgroup added in v1.3.0

func (c *Container) Cgroup() cgroups.Cgroup

Cgroup of the container

func (*Container) CgroupSet added in v1.3.0

func (c *Container) CgroupSet(cg cgroups.Cgroup)

CgroupSet sets the cgroup to the container

func (*Container) Checkpoint added in v1.3.0

func (c *Container) Checkpoint(ctx context.Context, r *task.CheckpointTaskRequest) error

Checkpoint the container

func (*Container) CloseIO added in v1.3.0

func (c *Container) CloseIO(ctx context.Context, r *task.CloseIORequest) error

CloseIO of a process

func (*Container) Delete added in v1.3.0

Delete the container or a process by id

func (*Container) Exec added in v1.3.0

Exec an additional process

func (*Container) ExecdProcesses added in v1.3.0

func (c *Container) ExecdProcesses() (o []process.Process)

ExecdProcesses added to the container

func (*Container) HasPid added in v1.3.0

func (c *Container) HasPid(pid int) bool

HasPid returns true if the container owns a specific pid

func (*Container) Kill added in v1.3.0

func (c *Container) Kill(ctx context.Context, r *task.KillRequest) error

Kill a process

func (*Container) Pause added in v1.3.0

func (c *Container) Pause(ctx context.Context) error

Pause the container

func (*Container) Pid added in v1.3.0

func (c *Container) Pid() int

Pid of the main process of a container

func (*Container) Process added in v1.3.0

func (c *Container) Process(id string) (process.Process, error)

Process returns the process by id

func (*Container) ProcessAdd added in v1.3.0

func (c *Container) ProcessAdd(process process.Process)

ProcessAdd adds a new process to the container

func (*Container) ProcessRemove added in v1.3.0

func (c *Container) ProcessRemove(id string)

ProcessRemove removes the process by id from the container

func (*Container) ReserveProcess added in v1.3.0

func (c *Container) ReserveProcess(id string) (bool, func())

ReserveProcess checks for the existence of an id and atomically reserves the process id if it does not already exist

Returns true if the process id was successfully reserved and a cancel func to release the reservation

func (*Container) ResizePty added in v1.3.0

func (c *Container) ResizePty(ctx context.Context, r *task.ResizePtyRequest) error

ResizePty of a process

func (*Container) Resume added in v1.3.0

func (c *Container) Resume(ctx context.Context) error

Resume the container

func (*Container) Start added in v1.3.0

Start a container process

func (*Container) Update added in v1.3.0

func (c *Container) Update(ctx context.Context, r *task.UpdateTaskRequest) error

Update the resource information of a running container

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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