package proc
import "github.com/containerd/containerd/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(context context.Context, path, workDir, runtimeRoot, namespace, criu string, systemdCgroup bool, platform Platform, r *CreateConfig) (*Init, error)
- func (p *Init) ExitStatus() int
- func (p *Init) ExitedAt() time.Time
- func (p *Init) ID() string
- func (p *Init) KillAll(context context.Context) error
- func (p *Init) Pid() int
- func (p *Init) Runtime() *runc.Runc
- func (p *Init) Status(ctx context.Context) (string, error)
- func (p *Init) Stdin() io.Closer
- func (p *Init) Stdio() Stdio
- func (p *Init) Wait()
- type Mount
- type Platform
- type Process
- type State
- type Stdio
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 Options *google_protobuf.Any }
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 ¶
Init represents an initial process for a container
func New ¶
func New(context context.Context, path, workDir, runtimeRoot, namespace, criu string, systemdCgroup bool, platform Platform, r *CreateConfig) (*Init, error)
New returns a new init 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) KillAll ¶
KillAll processes belonging to the init process
func (*Init) Pid ¶
Pid of the process
func (*Init) Runtime ¶
Runtime returns the OCI runtime configured for 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) Wait ¶
func (p *Init) Wait()
Wait for the process to exit
type Mount ¶
Mount holds filesystem mount configuration
type Platform ¶
type Platform interface { CopyConsole(ctx context.Context, console console.Console, stdin, stdout, stderr string, wg, cwg *sync.WaitGroup) (console.Console, error) ShutdownConsole(ctx context.Context, console console.Console) error Close() error }
Platform handles platform-specific behavior that may differs across platform implementations
type Process ¶
type Process interface { State // ID returns the id for the process ID() string // Pid returns the pid for the process Pid() int // ExitStatus returns the exit status ExitStatus() int // ExitedAt is the time the process exited ExitedAt() time.Time // Stdin returns the process STDIN Stdin() io.Closer // Stdio returns io information for the container Stdio() Stdio // Status returns the process status Status(context.Context) (string, error) // Wait blocks until the process has exited Wait() }
Process on a linux system
type State ¶
type State interface { // Resize resizes the process console Resize(ws console.WinSize) error // Start execution of the process Start(context.Context) error // Delete deletes the process and its resourcess Delete(context.Context) error // Kill kills the process Kill(context.Context, uint32, bool) error // SetExited sets the exit status for the process SetExited(status int) }
State of a process
type Stdio ¶
Stdio of a process
func (Stdio) IsNull ¶
IsNull returns true if the stdio is not defined
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.1.0-rc.0
- Published
- Mar 27, 2018
- Platform
- linux/amd64
- Imports
- 22 packages
- Last checked
- 1 minute ago –
Tools for package owners.