package proc
import "github.com/containerd/containerd/runtime/v1/linux/proc"
Index ¶
- Constants
- func NewRunc(root, path, namespace, runtime, criu string, systemd bool) *runc.Runc
- type CheckpointConfig
- type CreateConfig
- type ExecConfig
- type Init
- func New(id string, runtime *runc.Runc, stdio proc.Stdio) *Init
- func (p *Init) Checkpoint(ctx context.Context, r *CheckpointConfig) error
- func (p *Init) Create(ctx context.Context, r *CreateConfig) error
- func (p *Init) Delete(ctx context.Context) error
- func (p *Init) Exec(ctx context.Context, path string, r *ExecConfig) (proc.Process, error)
- func (p *Init) ExitStatus() int
- func (p *Init) ExitedAt() time.Time
- func (p *Init) ID() string
- func (p *Init) Kill(ctx context.Context, signal uint32, all bool) error
- func (p *Init) KillAll(ctx context.Context) error
- func (p *Init) Pause(ctx context.Context) error
- func (p *Init) Pid() int
- func (p *Init) Resize(ws console.WinSize) error
- func (p *Init) Resume(ctx context.Context) error
- func (p *Init) Runtime() *runc.Runc
- func (p *Init) SetExited(status int)
- func (p *Init) Start(ctx context.Context) error
- func (p *Init) Status(ctx context.Context) (string, error)
- func (p *Init) Stdin() io.Closer
- func (p *Init) Stdio() proc.Stdio
- func (p *Init) Update(ctx context.Context, r *google_protobuf.Any) error
- func (p *Init) Wait()
- type Mount
Constants ¶
const InitPidFile = "init.pid"
InitPidFile name of the file that contains the init pid
const RuncRoot = "/run/containerd/runc"
RuncRoot is the path to the root runc state directory
Functions ¶
func NewRunc ¶
NewRunc returns a new runc instance for a process
Types ¶
type CheckpointConfig ¶
type CheckpointConfig struct { Path string Exit bool AllowOpenTCP bool AllowExternalUnixSockets bool AllowTerminal bool FileLocks bool EmptyNamespaces []string }
CheckpointConfig holds task checkpoint configuration
type CreateConfig ¶
type CreateConfig struct { ID string Bundle string Runtime string Rootfs []Mount Terminal bool Stdin string Stdout string Stderr string Checkpoint string ParentCheckpoint string Options *google_protobuf.Any }
CreateConfig hold task creation configuration
type ExecConfig ¶
type ExecConfig struct { ID string Terminal bool Stdin string Stdout string Stderr string Spec *google_protobuf.Any }
ExecConfig holds exec creation configuration
type Init ¶
type Init struct { WorkDir string Bundle string Platform proc.Platform Rootfs string IoUID int IoGID int NoPivotRoot bool NoNewKeyring bool // contains filtered or unexported fields }
Init represents an initial process for a container
func New ¶
New returns a new process
func (*Init) Checkpoint ¶
func (p *Init) Checkpoint(ctx context.Context, r *CheckpointConfig) error
Checkpoint the init process
func (*Init) Create ¶
func (p *Init) Create(ctx context.Context, r *CreateConfig) error
Create the process with the provided config
func (*Init) Delete ¶
Delete the init process
func (*Init) Exec ¶
Exec returns a new child process
func (*Init) ExitStatus ¶
ExitStatus of the process
func (*Init) ExitedAt ¶
ExitedAt at time when the process exited
func (*Init) ID ¶
ID of the process
func (*Init) Kill ¶
Kill the init process
func (*Init) KillAll ¶
KillAll processes belonging to the init process
func (*Init) Pause ¶
Pause the init process and all its child processes
func (*Init) Pid ¶
Pid of the process
func (*Init) Resize ¶
Resize the init processes console
func (*Init) Resume ¶
Resume the init process and all its child processes
func (*Init) Runtime ¶
Runtime returns the OCI runtime configured for the init process
func (*Init) SetExited ¶
SetExited of the init process with the next status
func (*Init) Start ¶
Start the init process
func (*Init) Status ¶
Status of the process
func (*Init) Stdin ¶
Stdin of the process
func (*Init) Stdio ¶
Stdio of the process
func (*Init) Update ¶
Update the processes resource configuration
func (*Init) Wait ¶
func (p *Init) Wait()
Wait for the process to exit
type Mount ¶
Mount holds filesystem mount configuration
Source Files ¶
deleted_state.go exec.go exec_state.go init.go init_state.go io.go process.go types.go utils.go
- Version
- v1.2.2
- Published
- Jan 8, 2019
- Platform
- linux/amd64
- Imports
- 22 packages
- Last checked
- 2 minutes ago –
Tools for package owners.