mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Move plugin client creation to the extension point
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
parent
9c2c887b12
commit
f51a96c016
14 changed files with 229 additions and 47 deletions
|
@ -49,8 +49,12 @@ func registerMetricsPluginCallback(store *plugin.Store, sockPath string) {
|
|||
return
|
||||
}
|
||||
|
||||
if err := pluginStartMetricsCollection(p); err != nil {
|
||||
logrus.WithError(err).WithField("name", name).Error("error while initializing metrics plugin")
|
||||
adapter, err := makePluginAdapter(p)
|
||||
if err != nil {
|
||||
logrus.WithError(err).WithField("plugin", p.Name()).Error("Error creating plugin adapater")
|
||||
}
|
||||
if err := adapter.StartMetrics(); err != nil {
|
||||
logrus.WithError(err).WithField("plugin", p.Name()).Error("Error starting metrics collector plugin")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue