2015-10-08 11:57:30 -04:00
|
|
|
package daemon
|
|
|
|
|
2016-07-01 14:36:11 -04:00
|
|
|
import (
|
2016-09-06 14:18:12 -04:00
|
|
|
"github.com/docker/docker/api/types/container"
|
2016-07-18 11:02:12 -04:00
|
|
|
"github.com/docker/docker/libcontainerd"
|
2016-07-01 14:36:11 -04:00
|
|
|
"github.com/docker/docker/plugin"
|
|
|
|
)
|
2015-10-08 11:57:30 -04:00
|
|
|
|
2015-12-18 13:36:17 -05:00
|
|
|
func (daemon *Daemon) verifyExperimentalContainerSettings(hostConfig *container.HostConfig, config *container.Config) ([]string, error) {
|
2015-10-08 11:57:30 -04:00
|
|
|
return nil, nil
|
|
|
|
}
|
2016-07-01 14:36:11 -04:00
|
|
|
|
2016-10-06 10:09:54 -04:00
|
|
|
func (daemon *Daemon) pluginInit(cfg *Config, remote libcontainerd.Remote) error {
|
|
|
|
if !daemon.HasExperimental() {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return plugin.Init(cfg.Root, daemon.PluginStore, remote, daemon.RegistryService, cfg.LiveRestoreEnabled, daemon.LogPluginEvent)
|
2016-07-18 11:02:12 -04:00
|
|
|
}
|
|
|
|
|
2016-10-06 10:09:54 -04:00
|
|
|
func (daemon *Daemon) pluginShutdown() {
|
|
|
|
if !daemon.HasExperimental() {
|
|
|
|
return
|
|
|
|
}
|
2016-07-18 11:02:12 -04:00
|
|
|
manager := plugin.GetManager()
|
|
|
|
// Check for a valid manager object. In error conditions, daemon init can fail
|
|
|
|
// and shutdown called, before plugin manager is initialized.
|
|
|
|
if manager != nil {
|
|
|
|
manager.Shutdown()
|
|
|
|
}
|
2016-07-01 14:36:11 -04:00
|
|
|
}
|