Compile driver interface changes

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
Michael Crosby 2014-01-20 18:27:36 -08:00 коммит произвёл Guillaume J. Charmes
Родитель 75e0357d69
Коммит ba8ca59862
3 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -74,7 +74,7 @@ func (d *driver) Kill(p *execdriver.Command, sig int) error {
return p.Process.Kill()
}
func (d *driver) Wait(id string) error {
func (d *driver) Restore(c *execdriver.Command) error {
panic("Not Implemented")
}

Просмотреть файл

@ -61,9 +61,9 @@ type Info interface {
type Driver interface {
Run(c *Command, startCallback StartCallback) (int, error) // Run executes the process and blocks until the process exits and returns the exit code
Kill(c *Command, sig int) error
Restore(id string) (*Command, error) // Wait and try to re-attach on an out of process...process (lxc ghosts)
Name() string // Driver name
Info(id string) Info // "temporary" hack (until we move state from core to plugins)
Restore(c *Command) error // Wait and try to re-attach on an out of process command
Name() string // Driver name
Info(id string) Info // "temporary" hack (until we move state from core to plugins)
}
// Network settings of the container

Просмотреть файл

@ -176,9 +176,9 @@ func (d *driver) Kill(c *execdriver.Command, sig int) error {
return d.kill(c, sig)
}
func (d *driver) Wait(id string) error {
func (d *driver) Restore(c *execdriver.Command) error {
for {
output, err := exec.Command("lxc-info", "-n", id).CombinedOutput()
output, err := exec.Command("lxc-info", "-n", c.ID).CombinedOutput()
if err != nil {
return err
}