plugins

package
v2.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(pluginName string) (pi *plugin.Plugin, err error)

Load loads plugin module. If pluginName is relative path name, it is loaded from one of the current GOPATH directories or current working directory. If the path is an absolute path, it loads from the path. err is nil if it succeeds.

Types

type SymbolLoader

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

func NewSymbolLoader

func NewSymbolLoader(moduleName string) (*SymbolLoader, error)

NewSymbolLoader creates a SymbolLoader that loads symbol from a particular module. moduleName can be a file name under one of $GOPATH directories or current working directory, or an absolute path to the file.

func (*SymbolLoader) LoadSymbol

func (l *SymbolLoader) LoadSymbol(symbolName string) (interface{}, error)

LoadSymbol looks up a symbol from the module. Plugin packages can accept this by defining an interface type without importing this package. It is important to note that each plugin package cannot import this plugins package since plugin module cannot import any packages that import built-in plugin package.

Directories

Path Synopsis
Package bgworker provides interface for bgworker plugins.
Package bgworker provides interface for bgworker plugins.
Package trigger provides interface for trigger plugins.
Package trigger provides interface for trigger plugins.

Jump to

Keyboard shortcuts

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