Apply any configuration to a plugin
This commit is contained in:
parent
f0675e52c3
commit
81f41059f4
9
agent.go
9
agent.go
|
@ -78,7 +78,14 @@ func (a *Agent) LoadPlugins() ([]string, error) {
|
||||||
var names []string
|
var names []string
|
||||||
|
|
||||||
for name, creator := range plugins.Plugins {
|
for name, creator := range plugins.Plugins {
|
||||||
a.plugins = append(a.plugins, creator())
|
plugin := creator()
|
||||||
|
|
||||||
|
err := a.Config.Apply(name, plugin)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
a.plugins = append(a.plugins, plugin)
|
||||||
names = append(names, name)
|
names = append(names, name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue