Documentation
¶
Index ¶
- func GetTopic(e interface{}) string
- func NewBinaryCmd(binaryURI *url.URL, id, ns string) *exec.Cmd
- func NewPlatform() (stdio.Platform, error)
- type Container
- func (c *Container) All() (o []*Process)
- func (c *Container) Cgroup() cgroup1.Cgroup
- func (c *Container) CgroupSet(cg cgroup1.Cgroup)
- func (c *Container) Checkpoint(ctx context.Context, r *taskAPI.CheckpointTaskRequest) error
- func (c *Container) CloseIO(ctx context.Context, r *taskAPI.CloseIORequest) error
- func (c *Container) Delete(ctx context.Context, r *taskAPI.DeleteRequest) (*Process, error)
- func (c *Container) Exec(ctx context.Context, r *taskAPI.ExecProcessRequest) (*Process, error)
- func (c *Container) ExecdProcesses() (o []*Process)
- func (c *Container) HasPid(pid int) bool
- func (c *Container) Kill(ctx context.Context, r *taskAPI.KillRequest) error
- func (c *Container) Pause(ctx context.Context) error
- func (c *Container) Pid() int
- func (c *Container) Process(id string) (*Process, error)
- func (c *Container) ProcessAdd(process *Process)
- func (c *Container) ProcessExists(id string) bool
- func (c *Container) ProcessRemove(id string)
- func (c *Container) ResizePty(ctx context.Context, r *taskAPI.ResizePtyRequest) error
- func (c *Container) Resume(ctx context.Context) error
- func (c *Container) Start(ctx context.Context, r *taskAPI.StartRequest) (*Process, error)
- func (c *Container) Update(ctx context.Context, r *taskAPI.UpdateTaskRequest) error
- type Exit
- type Process
- func (p *Process) Delete(context.Context) error
- func (p *Process) ExitStatus() int
- func (p *Process) ExitedAt() time.Time
- func (p *Process) ID() string
- func (p *Process) Kill(context.Context, uint32, bool) error
- func (p *Process) Pid() int
- func (p *Process) Resize(ws console.WinSize) error
- func (p *Process) SetExited(status int)
- func (p *Process) Start(ctx context.Context) (err error)
- func (p *Process) Status(context.Context) (string, error)
- func (p *Process) Stdin() io.Closer
- func (p *Process) Stdio() stdio.Stdio
- func (p *Process) Wait()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTopic ¶
func GetTopic(e interface{}) string
GetTopic converts an event from an interface type to the specific event topic id
func NewBinaryCmd ¶
NewBinaryCmd returns a Cmd to be used to start a logging binary. The Cmd is generated from the provided uri, and the container ID and namespace are appended to the Cmd environment. ported from https://github.com/containerd/containerd/blob/v2.0.0/cmd/containerd-shim-runc-v2/process/io_util.go#L28
func NewPlatform ¶
NewPlatform returns a linux platform for use with I/O operations
Types ¶
type Container ¶
type Container struct {
// ID of the container
ID string
// Bundle path
Bundle string
// Root Remap
RootRemap string
// contains filtered or unexported fields
}
Container for operating on a runc container and its processes
func NewContainer ¶
func NewContainer(ctx context.Context, platform stdio.Platform, r *taskAPI.CreateTaskRequest, ec chan<- Exit) (c *Container, err error)
NewContainer returns a new runc container
func (*Container) Checkpoint ¶
Checkpoint the container
func (*Container) ExecdProcesses ¶
ExecdProcesses added to the container
func (*Container) ProcessAdd ¶
ProcessAdd adds a new process to the container
func (*Container) ProcessExists ¶
ProcessExists returns true if the process by id exists
func (*Container) ProcessRemove ¶
ProcessRemove removes the process by id from the container
type Process ¶
type Process struct {
// contains filtered or unexported fields
}