mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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
4 changed files with 1 additions and 14 deletions
|
@ -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() {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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{}),
|
||||
pushingPool: make(map[string]chan struct{}),
|
||||
}
|
||||
daemon.SetServer(srv)
|
||||
return srv, nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue