Merge pull request #19861 from fangyuan930917/19350-remove-Info

remove the unused Info interface in daemon/execdriver/driver.go
This commit is contained in:
Brian Goff 2016-02-01 21:44:39 -05:00
commit 193ef9f0c1
4 changed files with 0 additions and 63 deletions

View file

@ -39,12 +39,6 @@ type Hooks struct {
PostStop []DriverCallback
}
// Info is driver specific information based on
// processes registered with the driver
type Info interface {
IsRunning() bool
}
// Terminal represents a pseudo TTY, it is for when
// using a container interactively.
type Terminal interface {
@ -75,10 +69,6 @@ type Driver interface {
// Name returns the name of the driver.
Name() string
// Info returns the configuration stored in the driver struct,
// "temporary" hack (until we move state from core to plugins).
Info(id string) Info
// GetPidsForContainer returns a list of pid for the processes running in a container.
GetPidsForContainer(id string) ([]int, error)

View file

@ -349,14 +349,6 @@ func (d *Driver) Terminate(c *execdriver.Command) error {
return err
}
// Info implements the exec driver Driver interface.
func (d *Driver) Info(id string) execdriver.Info {
return &info{
ID: id,
driver: d,
}
}
// Name implements the exec driver Driver interface.
func (d *Driver) Name() string {
return fmt.Sprintf("%s-%s", DriverName, Version)

View file

@ -1,16 +0,0 @@
// +build linux,cgo
package native
type info struct {
ID string
driver *Driver
}
// IsRunning is determined by looking for the
// pid file for a container. If the file exists then the
// container is currently running
func (i *info) IsRunning() bool {
_, ok := i.driver.activeContainers[i.ID]
return ok
}

View file

@ -1,29 +0,0 @@
// +build windows
package windows
import (
"github.com/docker/docker/daemon/execdriver"
"github.com/docker/engine-api/types/container"
)
type info struct {
ID string
driver *Driver
isolation container.IsolationLevel
}
// Info implements the exec driver Driver interface.
func (d *Driver) Info(id string) execdriver.Info {
return &info{
ID: id,
driver: d,
isolation: DefaultIsolation,
}
}
func (i *info) IsRunning() bool {
var running bool
running = true // TODO Need an HCS API
return running
}