Documentation
¶
Overview ¶
Package plg provides extensions and utilities for the standard plugin library. It aims to simplify plugin loading, symbol lookup, and error handling when working with Go plugins.
Index ¶
- func LoadAll(paths []string) (map[string]*plugin.Plugin, error)
- func LoadAndLookup(path, symbolName string) (plugin.Symbol, error)
- func LoadOrError(path string) (*plugin.Plugin, error)
- func LookupFunc(p *plugin.Plugin, symbolName string, expectedType interface{}) (reflect.Value, error)
- func LookupSymbol(p *plugin.Plugin, symbolName string) (plugin.Symbol, error)
- type PluginCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadAndLookup ¶
LoadAndLookup combines loading a plugin and looking up a symbol
func LoadOrError ¶
LoadOrError loads a plugin and returns an error if it cannot be loaded
Types ¶
type PluginCache ¶
type PluginCache struct {
// contains filtered or unexported fields
}
PluginCache provides a thread-safe cache for loaded plugins
Click to show internal directories.
Click to hide internal directories.