Documentation
      ¶
    
    
  
    
      Index ¶
- Constants
 - func NewBinaryIO(ctx context.Context, id string, uri *url.URL) (runc.IO, error)
 - func NewRunc(root, path, namespace, runtime, criu string, systemd bool) *runc.Runc
 - type CheckpointConfig
 - type CreateConfig
 - type ExecConfig
 - type 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) (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() stdio.Stdio
 - func (p *Init) Update(ctx context.Context, r *google_protobuf.Any) error
 - func (p *Init) Wait()
 
- type Mount
 - type Process
 
Constants ¶
      View Source
      
  
const ( // RuncRoot is the path to the root runc state directory RuncRoot = "/run/containerd/runc" // StoppedPID is the pid assigned after a container has run and stopped StoppedPID = -1 // InitPidFile name of the file that contains the init pid InitPidFile = "init.pid" )
Variables ¶
This section is empty.
Functions ¶
func NewBinaryIO ¶
NewBinaryIO runs a custom binary process for pluggable shim logging
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 Init ¶
type Init struct {
	WorkDir string
	Bundle string
	Platform stdio.Platform
	Rootfs       string
	IoUID        int
	IoGID        int
	NoPivotRoot  bool
	NoNewKeyring bool
	CriuWorkPath string
	// contains filtered or unexported fields
}
    Init represents an initial process for a container
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
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
 Click to show internal directories. 
   Click to hide internal directories.