loader

package
v0.6.0-rc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2020 License: Apache-2.0, MIT, Apache-2.0, + 1 more Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Preload added in v0.5.0

func Preload(plugins ...plugin.Plugin)

Preload adds one or more plugins to the preload list. This should _only_ be called during init.

Types

type PluginLoader added in v0.4.19

type PluginLoader struct {
	// contains filtered or unexported fields
}

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 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

StopDaemon 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.5.0

func (loader *PluginLoader) Load(pl plugin.Plugin) error

Load loads a plugin into the plugin loader.

func (*PluginLoader) LoadDirectory added in v0.5.0

func (loader *PluginLoader) LoadDirectory(pluginDir string) error

LoadDirectory loads a directory of plugins into the plugin loader.

func (*PluginLoader) Start added in v0.4.19

func (loader *PluginLoader) Start(node *core.IpfsNode) error

Start starts all long-running plugins.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL