Documentation ¶
Index ¶
- Constants
- type Driver
- func (d *Driver) Clean(id string) error
- func (d *Driver) Exec(c *execdriver.Command, processConfig *execdriver.ProcessConfig, ...) (int, error)
- func (d *Driver) GetPidsForContainer(id string) ([]int, error)
- func (d *Driver) Info(id string) execdriver.Info
- func (d *Driver) Kill(c *execdriver.Command, sig int) error
- func (d *Driver) Name() string
- func (d *Driver) Pause(c *execdriver.Command) error
- func (d *Driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, hooks execdriver.Hooks) (execdriver.ExitStatus, error)
- func (d *Driver) Stats(id string) (*execdriver.ResourceStats, error)
- func (d *Driver) SupportsHooks() bool
- func (d *Driver) Terminate(c *execdriver.Command) error
- func (d *Driver) Unpause(c *execdriver.Command) error
- func (d *Driver) Update(c *execdriver.Command) error
- type TtyConsole
Constants ¶
const ( DriverName = "native" Version = "0.2" )
Define constants for native driver
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶ added in v1.9.0
Driver contains all information for native driver, it implements execdriver.Driver.
func (*Driver) Exec ¶ added in v1.9.0
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 ¶ added in v1.9.0
GetPidsForContainer implements the exec driver Driver interface.
func (*Driver) Info ¶ added in v1.9.0
func (d *Driver) Info(id string) execdriver.Info
Info implements the exec driver Driver interface.
func (*Driver) Kill ¶ added in v1.9.0
func (d *Driver) Kill(c *execdriver.Command, sig int) error
Kill implements the exec driver Driver interface.
func (*Driver) Pause ¶ added in v1.9.0
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 ¶ added in v1.9.0
func (d *Driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, hooks execdriver.Hooks) (execdriver.ExitStatus, error)
Run implements the exec driver Driver interface, it calls libcontainer APIs to run a container.
func (*Driver) Stats ¶ added in v1.9.0
func (d *Driver) Stats(id string) (*execdriver.ResourceStats, error)
Stats implements the exec driver Driver interface.
func (*Driver) SupportsHooks ¶ added in v1.9.0
SupportsHooks implements the execdriver Driver interface. The libcontainer/runC-based native execdriver does exploit the hook mechanism
func (*Driver) Terminate ¶ added in v1.9.0
func (d *Driver) Terminate(c *execdriver.Command) error
Terminate implements the exec driver Driver interface.
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