package process

import "github.com/containerd/containerd/pkg/process"

Index

Functions

func CloseFiles

func CloseFiles(files ...*os.File)

CloseFiles closes any files passed in. It it used for cleanup in the event of unexpected errors.

func NewBinaryCmd

func NewBinaryCmd(binaryURI *url.URL, id, ns string) *exec.Cmd

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.

Types

type CheckpointConfig

type CheckpointConfig struct {
	WorkDir                  string
	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 Mount

type Mount struct {
	Type    string
	Source  string
	Target  string
	Options []string
}

Mount holds filesystem mount configuration

type Process

type Process interface {
	// 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.Stdio
	// Status returns the process status
	Status(context.Context) (string, error)
	// Wait blocks until the process has exited
	Wait()
	// 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)
}

Process on a system

Source Files

io_util.go process.go types.go

Version
v1.6.18
Published
Feb 15, 2023
Platform
windows/amd64
Imports
9 packages
Last checked
2 minutes ago

Tools for package owners.