run

package
v0.0.0-...-ed4b4ac Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

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
	Stop()
	Wait() error
	Exec(*specs.Process, ContainerIO) error
	Destroy() error
	Close() error
}

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, signal string, all 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)

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