Documentation ¶
Index ¶
- func Preload(plugins ...plugin.Plugin)
- type PluginLoader
- func (loader *PluginLoader) Close() error
- func (loader *PluginLoader) Initialize() error
- func (loader *PluginLoader) Inject() error
- func (loader *PluginLoader) Load(pl plugin.Plugin) error
- func (loader *PluginLoader) LoadDirectory(pluginDir string) error
- func (loader *PluginLoader) Start(node *core.IpfsNode) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PluginLoader ¶ added in v0.4.19
type PluginLoader struct {
// contains filtered or unexported fields
}
PluginLoader keeps track of loaded plugins.
To use:
- Load any desired plugins with Load and LoadDirectory. Preloaded plugins will automatically be loaded.
- Call Initialize to run all initialization logic.
- Call Inject to register the plugins.
- Optionally call Start to start plugins.
- Call Close to close all plugins.
func NewPluginLoader ¶ added in v0.4.19
func NewPluginLoader(repo string) (*PluginLoader, error)
NewPluginLoader creates new plugin loader.
func (*PluginLoader) Close ¶ added in v0.4.19
func (loader *PluginLoader) Close() error
Close stops all long-running plugins.
func (*PluginLoader) Initialize ¶ added in v0.4.19
func (loader *PluginLoader) Initialize() error
Initialize initializes all loaded plugins.
func (*PluginLoader) Inject ¶ added in v0.4.19
func (loader *PluginLoader) Inject() error
Inject hooks all the plugins into the appropriate subsystems.
func (*PluginLoader) Load ¶ added in v0.18.1
func (loader *PluginLoader) Load(pl plugin.Plugin) error
Load loads a plugin into the plugin loader.
func (*PluginLoader) LoadDirectory ¶ added in v0.18.1
func (loader *PluginLoader) LoadDirectory(pluginDir string) error
LoadDirectory loads a directory of plugins into the plugin loader.
Click to show internal directories.
Click to hide internal directories.