native

package
v1.9.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2015 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DriverName = "native"
	Version    = "0.2"
)

Define constants for native driver

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Driver contains all information for native driver, it implements execdriver.Driver.

func NewDriver

func NewDriver(root, initPath string, options []string) (*Driver, error)

NewDriver returns a new native driver, called from NewDriver of execdriver.

func (*Driver) Clean

func (d *Driver) Clean(id string) error

Clean implements the exec driver Driver interface.

func (*Driver) Exec

func (d *Driver) Exec(c *execdriver.Command, processConfig *execdriver.ProcessConfig, pipes *execdriver.Pipes, hooks execdriver.Hooks) (int, error)

Exec implements the exec driver Driver interface, it calls libcontainer APIs to execute a container.

func (*Driver) GetPidsForContainer

func (d *Driver) GetPidsForContainer(id string) ([]int, error)

GetPidsForContainer implements the exec driver Driver interface.

func (*Driver) Info

func (d *Driver) Info(id string) execdriver.Info

Info implements the exec driver Driver interface.

func (*Driver) Kill

func (d *Driver) Kill(c *execdriver.Command, sig int) error

Kill implements the exec driver Driver interface.

func (*Driver) Name

func (d *Driver) Name() string

Name implements the exec driver Driver interface.

func (*Driver) Pause

func (d *Driver) Pause(c *execdriver.Command) error

Pause implements the exec driver Driver interface, it calls libcontainer API to pause a container.

func (*Driver) Run

Run implements the exec driver Driver interface, it calls libcontainer APIs to run a container.

func (*Driver) Stats

func (d *Driver) Stats(id string) (*execdriver.ResourceStats, error)

Stats implements the exec driver Driver interface.

func (*Driver) SupportsHooks

func (d *Driver) SupportsHooks() bool

SupportsHooks implements the execdriver Driver interface. The libcontainer/runC-based native execdriver does exploit the hook mechanism

func (*Driver) Terminate

func (d *Driver) Terminate(c *execdriver.Command) error

Terminate implements the exec driver Driver interface.

func (*Driver) Unpause

func (d *Driver) Unpause(c *execdriver.Command) error

Unpause implements the exec driver Driver interface, it calls libcontainer API to unpause a container.

type TtyConsole added in v1.2.0

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

TtyConsole implements the exec driver Terminal interface.

func NewTtyConsole added in v1.2.0

func NewTtyConsole(console libcontainer.Console, pipes *execdriver.Pipes) (*TtyConsole, error)

NewTtyConsole returns a new TtyConsole struct.

func (*TtyConsole) AttachPipes added in v1.2.0

func (t *TtyConsole) AttachPipes(pipes *execdriver.Pipes) error

AttachPipes attaches given pipes to TtyConsole

func (*TtyConsole) Close added in v1.2.0

func (t *TtyConsole) Close() error

Close implements Close method of Terminal interface

func (*TtyConsole) Resize added in v1.2.0

func (t *TtyConsole) Resize(h, w int) error

Resize implements Resize method of Terminal interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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