mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
remove fixme
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
This commit is contained in:
parent
c4089ad80b
commit
328d65dcff
2 changed files with 18 additions and 12 deletions
|
@ -8,17 +8,19 @@ import (
|
||||||
"github.com/dotcloud/docker/server"
|
"github.com/dotcloud/docker/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Register(eng *engine.Engine) {
|
func Register(eng *engine.Engine) error {
|
||||||
daemon(eng)
|
if err := daemon(eng); err != nil {
|
||||||
remote(eng)
|
return err
|
||||||
// FIXME: engine.Installer.Install can fail. These errors
|
}
|
||||||
// should be passed up.
|
if err := remote(eng); err != nil {
|
||||||
registry.NewService().Install(eng)
|
return err
|
||||||
|
}
|
||||||
|
return registry.NewService().Install(eng)
|
||||||
}
|
}
|
||||||
|
|
||||||
// remote: a RESTful api for cross-docker communication
|
// remote: a RESTful api for cross-docker communication
|
||||||
func remote(eng *engine.Engine) {
|
func remote(eng *engine.Engine) error {
|
||||||
eng.Register("serveapi", api.ServeApi)
|
return eng.Register("serveapi", api.ServeApi)
|
||||||
}
|
}
|
||||||
|
|
||||||
// daemon: a default execution and storage backend for Docker on Linux,
|
// daemon: a default execution and storage backend for Docker on Linux,
|
||||||
|
@ -36,7 +38,9 @@ func remote(eng *engine.Engine) {
|
||||||
//
|
//
|
||||||
// These components should be broken off into plugins of their own.
|
// These components should be broken off into plugins of their own.
|
||||||
//
|
//
|
||||||
func daemon(eng *engine.Engine) {
|
func daemon(eng *engine.Engine) error {
|
||||||
eng.Register("initserver", server.InitServer)
|
if err := eng.Register("initserver", server.InitServer); err != nil {
|
||||||
eng.Register("init_networkdriver", bridge.InitDriver)
|
return err
|
||||||
|
}
|
||||||
|
return eng.Register("init_networkdriver", bridge.InitDriver)
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,7 +128,9 @@ func main() {
|
||||||
|
|
||||||
eng := engine.New()
|
eng := engine.New()
|
||||||
// Load builtins
|
// Load builtins
|
||||||
builtins.Register(eng)
|
if err := builtins.Register(eng); err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
// load the daemon in the background so we can immediately start
|
// load the daemon in the background so we can immediately start
|
||||||
// the http api so that connections don't fail while the daemon
|
// the http api so that connections don't fail while the daemon
|
||||||
// is booting
|
// is booting
|
||||||
|
|
Loading…
Reference in a new issue