go-ipfs: github.com/ipfs/go-ipfs/plugin/loader Index | Files

package loader

import "github.com/ipfs/go-ipfs/plugin/loader"

Index

Package Files

load_unix.go loader.go preload.go

func Preload Uses

func Preload(plugins ...plugin.Plugin)

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

type PluginLoader Uses

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 Uses

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

NewPluginLoader creates new plugin loader

func (*PluginLoader) Close Uses

func (loader *PluginLoader) Close() error

StopDaemon stops all long-running plugins.

func (*PluginLoader) Initialize Uses

func (loader *PluginLoader) Initialize() error

Initialize initializes all loaded plugins

func (*PluginLoader) Inject Uses

func (loader *PluginLoader) Inject() error

Inject hooks all the plugins into the appropriate subsystems.

func (*PluginLoader) Load Uses

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

Load loads a plugin into the plugin loader.

func (*PluginLoader) LoadDirectory Uses

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

LoadDirectory loads a directory of plugins into the plugin loader.

func (*PluginLoader) Start Uses

func (loader *PluginLoader) Start(iface coreiface.CoreAPI) error

Start starts all long-running plugins.

Package loader imports 20 packages (graph) and is imported by 16 packages. Updated 2019-09-30. Refresh now. Tools for package owners.