Add json tags and comments to exedriver types

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
Michael Crosby
2014-01-17 17:42:22 -08:00
parent f3f2456b04
commit e765c67b47
2 changed files with 28 additions and 28 deletions
+3 -13
View File
@@ -1,7 +1,6 @@
package lxc
import (
"errors"
"fmt"
"github.com/dotcloud/docker/execdriver"
"github.com/dotcloud/docker/utils"
@@ -14,15 +13,6 @@ import (
"time"
)
const (
startPath = "lxc-start"
)
var (
ErrNotRunning = errors.New("Process could not be started")
ErrWaitTimeoutReached = errors.New("Wait timeout reached")
)
type driver struct {
root string // root path for the driver to use
apparmor bool
@@ -47,7 +37,7 @@ func (d *driver) Name() string {
func (d *driver) Run(c *execdriver.Process, startCallback execdriver.StartCallback) (int, error) {
params := []string{
startPath,
"lxc-start",
"-n", c.ID,
"-f", c.ConfigPath,
"--",
@@ -155,7 +145,7 @@ func (d *driver) Wait(id string, duration time.Duration) error {
return err
case <-time.After(duration):
killer = true
return ErrWaitTimeoutReached
return execdriver.ErrWaitTimeoutReached
}
} else {
return <-done
@@ -214,7 +204,7 @@ func (d *driver) waitForStart(c *execdriver.Process, waitLock chan struct{}) err
}
time.Sleep(50 * time.Millisecond)
}
return ErrNotRunning
return execdriver.ErrNotRunning
}
func (d *driver) waitLxc(id string, kill *bool) <-chan error {