mirror of https://github.com/docker/docs.git
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>
This commit is contained in:
parent
61eab75939
commit
20b0841c1b
|
@ -514,9 +514,7 @@ func (container *Container) monitor(callback execdriver.StartCallback) error {
|
||||||
if container.Config.OpenStdin {
|
if container.Config.OpenStdin {
|
||||||
container.stdin, container.stdinPipe = io.Pipe()
|
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.
|
// 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.
|
// This will cause it to be restarted when the engine is restarted.
|
||||||
if container.daemon != nil && container.daemon.eng != nil && !container.daemon.eng.IsShutdown() {
|
if container.daemon != nil && container.daemon.eng != nil && !container.daemon.eng.IsShutdown() {
|
||||||
|
|
|
@ -94,7 +94,6 @@ type Daemon struct {
|
||||||
idIndex *truncindex.TruncIndex
|
idIndex *truncindex.TruncIndex
|
||||||
sysInfo *sysinfo.SysInfo
|
sysInfo *sysinfo.SysInfo
|
||||||
volumes *graph.Graph
|
volumes *graph.Graph
|
||||||
srv Server
|
|
||||||
eng *engine.Engine
|
eng *engine.Engine
|
||||||
config *daemonconfig.Config
|
config *daemonconfig.Config
|
||||||
containerGraph *graphdb.Database
|
containerGraph *graphdb.Database
|
||||||
|
@ -1032,10 +1031,6 @@ func (daemon *Daemon) ContainerGraph() *graphdb.Database {
|
||||||
return daemon.containerGraph
|
return daemon.containerGraph
|
||||||
}
|
}
|
||||||
|
|
||||||
func (daemon *Daemon) SetServer(server Server) {
|
|
||||||
daemon.srv = server
|
|
||||||
}
|
|
||||||
|
|
||||||
func (daemon *Daemon) checkLocaldns() error {
|
func (daemon *Daemon) checkLocaldns() error {
|
||||||
resolvConf, err := resolvconf.Get()
|
resolvConf, err := resolvconf.Get()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
package daemon
|
|
||||||
|
|
||||||
// FIXME: this shim interface is no longer needed, it can be removed
|
|
||||||
type Server interface {
|
|
||||||
}
|
|
|
@ -64,6 +64,5 @@ func NewServer(eng *engine.Engine, config *daemonconfig.Config) (*Server, error)
|
||||||
pullingPool: make(map[string]chan struct{}),
|
pullingPool: make(map[string]chan struct{}),
|
||||||
pushingPool: make(map[string]chan struct{}),
|
pushingPool: make(map[string]chan struct{}),
|
||||||
}
|
}
|
||||||
daemon.SetServer(srv)
|
|
||||||
return srv, nil
|
return srv, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue