Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PluginConfig ¶
type PluginConfig struct { // Path is the storage path of the plugin. Path string // ImportPath is the module path i.e. "github.com/user/module". ImportPath string }
PluginConfig is the configuration of the plugin.
type PluginHost ¶
type PluginHost struct {
// contains filtered or unexported fields
}
PluginHost manages the plugins.
func NewPluginHost ¶
func NewPluginHost(pluginTypes map[string]reflect.Type, symbols interp.Exports, embeddedPlugins fs.FS) *PluginHost
NewPluginHost initializes a PluginHost.
func (*PluginHost) GetPlugins ¶
func (h *PluginHost) GetPlugins(typ string) (list []any)
GetPlugins returns a list of all plugins.
func (*PluginHost) LoadPlugin ¶
func (h *PluginHost) LoadPlugin(config *PluginConfig) (map[string]any, error)
LoadPlugin loads a new plugin to the host.
Click to show internal directories.
Click to hide internal directories.