run

package
v0.7.1-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2019 License: Apache-2.0 Imports: 10 Imported by: 2 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExitError

func NewExitError(err error, containerId string) error

Types

type Container

type Container interface {
	ID() string
	Rootfs() string
	Start() error
	// TODO: expose process
	Exec(*specs.Process, ContainerIO) (Process, error)
	Destroy() error
	Process
}

type ContainerBundle

type ContainerBundle interface {
	ID() string
	Dir() string
	Spec() (*specs.Spec, error)
	Close() error
}

type ContainerConfig

type ContainerConfig struct {
	Id             string
	Bundle         ContainerBundle
	Io             ContainerIO
	NoPivotRoot    bool
	NoNewKeyring   bool
	DestroyOnClose bool
}

type ContainerGroup

type ContainerGroup struct {
	// contains filtered or unexported fields
}

func NewContainerGroup

func NewContainerGroup(debug log.Logger) *ContainerGroup

func (*ContainerGroup) Add

func (m *ContainerGroup) Add(c Container)

func (*ContainerGroup) Close

func (m *ContainerGroup) Close() (err error)

func (*ContainerGroup) Start

func (m *ContainerGroup) Start()

func (*ContainerGroup) Stop

func (m *ContainerGroup) Stop()

func (*ContainerGroup) Wait

func (m *ContainerGroup) Wait()

type ContainerIO

type ContainerIO struct {
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer
}

func NewStdContainerIO

func NewStdContainerIO() ContainerIO

type ContainerInfo

type ContainerInfo struct {
	ID     string
	Status string
}

type ContainerManager

type ContainerManager interface {
	NewContainer(cfg *ContainerConfig) (Container, error)
	Get(id string) (Container, error)
	List() ([]ContainerInfo, error)
	Kill(id string, signal os.Signal, all bool) error
	Exist(id string) (bool, error)
}

type ExitError

type ExitError struct {
	// contains filtered or unexported fields
}

func FindExitError

func FindExitError(err error) *ExitError

func (*ExitError) Code

func (e *ExitError) Code() int

func (*ExitError) ContainerID

func (e *ExitError) ContainerID() string

func (*ExitError) Error

func (e *ExitError) Error() string

func (*ExitError) Format

func (e *ExitError) Format(s fmt.State, verb rune)

type Process

type Process interface {
	Wait() error
	Stop()
	Close() error
}

Directories

Path Synopsis
This file is derived from opencontainers/runc/tty.go and opencontainers/runc/utils_linux.go (setupIO)
This file is derived from opencontainers/runc/tty.go and opencontainers/runc/utils_linux.go (setupIO)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL