Documentation ¶
Index ¶
- func GetTopic(e interface{}) string
- func NewPlatform() (stdio.Platform, error)
- func ReadOptions(path string) (*options.Options, error)
- func ReadRuntime(path string) (string, error)
- func ShouldKillAllOnExit(ctx context.Context, bundlePath string) bool
- func WriteOptions(path string, opts options.Options) error
- func WriteRuntime(path, runtime string) error
- type Container
- func (c *Container) All() (o []process.Process)
- func (c *Container) Cgroup() interface{}
- func (c *Container) CgroupSet(cg interface{})
- func (c *Container) Checkpoint(ctx context.Context, r *task.CheckpointTaskRequest) error
- func (c *Container) CloseIO(ctx context.Context, r *task.CloseIORequest) error
- func (c *Container) Delete(ctx context.Context, r *task.DeleteRequest) (process.Process, error)
- func (c *Container) Exec(ctx context.Context, r *task.ExecProcessRequest) (process.Process, error)
- func (c *Container) ExecdProcesses() (o []process.Process)
- func (c *Container) HasPid(pid int) bool
- func (c *Container) Kill(ctx context.Context, r *task.KillRequest) error
- func (c *Container) Pause(ctx context.Context) error
- func (c *Container) Pid() int
- func (c *Container) Process(id string) (process.Process, error)
- func (c *Container) ProcessAdd(process process.Process)
- func (c *Container) ProcessRemove(id string)
- func (c *Container) ReserveProcess(id string) (bool, func())
- func (c *Container) ResizePty(ctx context.Context, r *task.ResizePtyRequest) error
- func (c *Container) Resume(ctx context.Context) error
- func (c *Container) Start(ctx context.Context, r *task.StartRequest) (process.Process, error)
- func (c *Container) Update(ctx context.Context, r *task.UpdateTaskRequest) error
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
NewPlatform returns a linux platform for use with I/O operations
func ReadOptions ¶ added in v1.3.5
ReadOptions reads the option information from the path. When the file does not exist, ReadOptions returns nil without an error.
func ReadRuntime ¶ added in v1.3.0
ReadRuntime reads the runtime information from the path
func ShouldKillAllOnExit ¶ added in v1.4.0
ShouldKillAllOnExit reads the bundle's OCI spec and returns true if there is an error reading the spec or if the container has a private PID namespace
func WriteOptions ¶ added in v1.3.5
WriteOptions writes the options information into the path
func WriteRuntime ¶ added in v1.3.0
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) Cgroup ¶ added in v1.3.0
func (c *Container) Cgroup() interface{}
Cgroup of the container
func (*Container) CgroupSet ¶ added in v1.3.0
func (c *Container) CgroupSet(cg interface{})
CgroupSet sets the cgroup to the container
func (*Container) Checkpoint ¶ added in v1.3.0
Checkpoint the container
func (*Container) ExecdProcesses ¶ added in v1.3.0
ExecdProcesses added to the container
func (*Container) ProcessAdd ¶ added in v1.3.0
ProcessAdd adds a new process to the container
func (*Container) ProcessRemove ¶ added in v1.3.0
ProcessRemove removes the process by id from the container
func (*Container) ReserveProcess ¶ added in v1.3.0
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