Forráskód Böngészése

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

remove the unused Info interface in daemon/execdriver/driver.go
Brian Goff 9 éve
szülő
commit
193ef9f0c1

+ 0 - 10
daemon/execdriver/driver.go

@@ -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)
 

+ 0 - 8
daemon/execdriver/native/driver.go

@@ -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)

+ 0 - 16
daemon/execdriver/native/info.go

@@ -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
-}

+ 0 - 29
daemon/execdriver/windows/info.go

@@ -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
-}