Remove last trace of Daemon->Server dependency

This removes a shim `daemon.Server` interface which was used to start
separating Daemon from Server *gradually*, without getting cyclic
dependency errors.

Now that the last Daemon->Server dependency has been removed, we can
finally remove the shim. Yay!

Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 20b0841c1bd07c6add812597e0d656d7584e48ac
Component: engine
This commit is contained in:
Solomon Hykes
2014-08-06 17:56:12 +00:00
parent f56c09a5b4
commit 90ba5c6273
4 changed files with 1 additions and 14 deletions
+1 -3
View File
@@ -514,9 +514,7 @@ func (container *Container) monitor(callback execdriver.StartCallback) error {
if container.Config.OpenStdin {
container.stdin, container.stdinPipe = io.Pipe()
}
if container.daemon != nil && container.daemon.srv != nil {
container.LogEvent("die")
}
container.LogEvent("die")
// If the engine is shutting down, don't save the container state as stopped.
// This will cause it to be restarted when the engine is restarted.
if container.daemon != nil && container.daemon.eng != nil && !container.daemon.eng.IsShutdown() {
-5
View File
@@ -94,7 +94,6 @@ type Daemon struct {
idIndex *truncindex.TruncIndex
sysInfo *sysinfo.SysInfo
volumes *graph.Graph
srv Server
eng *engine.Engine
config *daemonconfig.Config
containerGraph *graphdb.Database
@@ -1032,10 +1031,6 @@ func (daemon *Daemon) ContainerGraph() *graphdb.Database {
return daemon.containerGraph
}
func (daemon *Daemon) SetServer(server Server) {
daemon.srv = server
}
func (daemon *Daemon) checkLocaldns() error {
resolvConf, err := resolvconf.Get()
if err != nil {
-5
View File
@@ -1,5 +0,0 @@
package daemon
// FIXME: this shim interface is no longer needed, it can be removed
type Server interface {
}
-1
View File
@@ -64,6 +64,5 @@ func NewServer(eng *engine.Engine, config *daemonconfig.Config) (*Server, error)
pullingPool: make(map[string]chan struct{}),
pushingPool: make(map[string]chan struct{}),
}
daemon.SetServer(srv)
return srv, nil
}