Version: v0.0.1 Latest Latest

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

Go to latest
Published: Jul 31, 2020 License: MIT Imports: 21 Imported by: 0




This section is empty.


This section is empty.


func Preload

func Preload(plugins ...plugin.Plugin)

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


type PluginLoader

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

func NewPluginLoader(repo string) (*PluginLoader, error)

NewPluginLoader creates new plugin loader

func (*PluginLoader) Close

func (loader *PluginLoader) Close() error

StopDaemon stops all long-running plugins.

func (*PluginLoader) Initialize

func (loader *PluginLoader) Initialize() error

Initialize initializes all loaded plugins

func (*PluginLoader) Inject

func (loader *PluginLoader) Inject() error

Inject hooks all the plugins into the appropriate subsystems.

func (*PluginLoader) Load

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

Load loads a plugin into the plugin loader.

func (*PluginLoader) LoadDirectory

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

LoadDirectory loads a directory of plugins into the plugin loader.

func (*PluginLoader) Start

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