pluginmgr

package
v0.0.0-...-d9e9996 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package pluginmgr is a plugin manager which keeps all plugins' instance Notice: any plugin using this framework should implements

a func named 'GetInstance' to return there instance

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(nc *config.NodeConfig) error

Init is not necessary, there is a default value

Types

type AChainPM

type AChainPM struct {
	PluginMgr *PluginMgr
	// contains filtered or unexported fields
}

AChainPM is the plugin manager wrapper for AmpChain

func GetPluginMgr

func GetPluginMgr() (*AChainPM, error)

GetPluginMgr return plugin manager instance

type PluginMgr

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

PluginMgr defines the data struct of plugin manager

func CreateMgr

func CreateMgr(rootFolder string, confPath string, logger log.Logger) (pm *PluginMgr, err error)

CreateMgr returns instance of PluginMgr

func (*PluginMgr) CreatePluginInstance

func (pm *PluginMgr) CreatePluginInstance(name string, subtype string) (pluginInstance interface{}, err error)

CreatePluginInstance always create new plugin instance

Jump to

Keyboard shortcuts

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