PluginLoader keeps track of loaded plugins. To use: 1. Load any desired plugins with Load and LoadDirectory. Preloaded plugins will automatically be loaded. 2. Call Initialize to run all initialization logic. 3. Call Inject to register the plugins. 4. Optionally call Start to start plugins. 5. Call
| 87 | // 4. Optionally call Start to start plugins. |
| 88 | // 5. Call Close to close all plugins. |
| 89 | type PluginLoader struct { |
| 90 | state loaderState |
| 91 | plugins []plugin.Plugin |
| 92 | started []plugin.Plugin |
| 93 | config config.Plugins |
| 94 | repo string |
| 95 | } |
| 96 | |
| 97 | // NewPluginLoader creates new plugin loader. |
| 98 | func NewPluginLoader(repo string) (*PluginLoader, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected