Browse code

remove the unused Info interface in daemon/execdriver/driver.go and related code

Signed-off-by: Fangyuan Gao <21551127@zju.edu.cn>

Fangyuan Gao authored on 2016/01/31 23:02:01
Showing 4 changed files
... ...
@@ -39,12 +39,6 @@ type Hooks struct {
39 39
 	PostStop []DriverCallback
40 40
 }
41 41
 
42
-// Info is driver specific information based on
43
-// processes registered with the driver
44
-type Info interface {
45
-	IsRunning() bool
46
-}
47
-
48 42
 // Terminal represents a pseudo TTY, it is for when
49 43
 // using a container interactively.
50 44
 type Terminal interface {
... ...
@@ -75,10 +69,6 @@ type Driver interface {
75 75
 	// Name returns the name of the driver.
76 76
 	Name() string
77 77
 
78
-	// Info returns the configuration stored in the driver struct,
79
-	// "temporary" hack (until we move state from core to plugins).
80
-	Info(id string) Info
81
-
82 78
 	// GetPidsForContainer returns a list of pid for the processes running in a container.
83 79
 	GetPidsForContainer(id string) ([]int, error)
84 80
 
... ...
@@ -349,14 +349,6 @@ func (d *Driver) Terminate(c *execdriver.Command) error {
349 349
 	return err
350 350
 }
351 351
 
352
-// Info implements the exec driver Driver interface.
353
-func (d *Driver) Info(id string) execdriver.Info {
354
-	return &info{
355
-		ID:     id,
356
-		driver: d,
357
-	}
358
-}
359
-
360 352
 // Name implements the exec driver Driver interface.
361 353
 func (d *Driver) Name() string {
362 354
 	return fmt.Sprintf("%s-%s", DriverName, Version)
363 355
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-// +build linux,cgo
2
-
3
-package native
4
-
5
-type info struct {
6
-	ID     string
7
-	driver *Driver
8
-}
9
-
10
-// IsRunning is determined by looking for the
11
-// pid file for a container.  If the file exists then the
12
-// container is currently running
13
-func (i *info) IsRunning() bool {
14
-	_, ok := i.driver.activeContainers[i.ID]
15
-	return ok
16
-}
17 1
deleted file mode 100644
... ...
@@ -1,29 +0,0 @@
1
-// +build windows
2
-
3
-package windows
4
-
5
-import (
6
-	"github.com/docker/docker/daemon/execdriver"
7
-	"github.com/docker/engine-api/types/container"
8
-)
9
-
10
-type info struct {
11
-	ID        string
12
-	driver    *Driver
13
-	isolation container.IsolationLevel
14
-}
15
-
16
-// Info implements the exec driver Driver interface.
17
-func (d *Driver) Info(id string) execdriver.Info {
18
-	return &info{
19
-		ID:        id,
20
-		driver:    d,
21
-		isolation: DefaultIsolation,
22
-	}
23
-}
24
-
25
-func (i *info) IsRunning() bool {
26
-	var running bool
27
-	running = true // TODO Need an HCS API
28
-	return running
29
-}