Documentation
¶
Index ¶
- type LoadedPlugin
- type Loader
- func (l *Loader) GetAvailable() ([]string, error)
- func (l *Loader) GetInstalled() ([]string, error)
- func (l *Loader) GetLoaded() map[string]*LoadedPlugin
- func (l *Loader) GetPluginDir() string
- func (l *Loader) Install(ctx context.Context, name string) error
- func (l *Loader) IsLoaded(name string) bool
- func (l *Loader) Load(ctx context.Context, path string) error
- func (l *Loader) LoadAll(ctx context.Context) error
- func (l *Loader) LoadByName(ctx context.Context, name string) error
- func (l *Loader) Remove(ctx context.Context, name string) error
- func (l *Loader) SetRepoURL(url string)
- func (l *Loader) Unload(ctx context.Context, name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoadedPlugin ¶
type LoadedPlugin struct {
Plugin pkgplugin.Plugin
Handle *goplugin.Plugin
Path string
Metadata *pkgplugin.PluginMetadata
LoadedAt time.Time
}
LoadedPlugin represents a loaded .so plugin.
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader loads/unloads/manages external plugins from .so files.
func (*Loader) GetAvailable ¶
GetAvailable returns .so files in the plugins dir that are NOT loaded.
func (*Loader) GetInstalled ¶
GetInstalled returns all .so files in the plugins dir.
func (*Loader) GetLoaded ¶
func (l *Loader) GetLoaded() map[string]*LoadedPlugin
GetLoaded returns all currently loaded plugins.
func (*Loader) GetPluginDir ¶
GetPluginDir returns the plugin directory path.
func (*Loader) Install ¶
Install downloads a plugin .so from the registry and places it in the plugins dir.
func (*Loader) LoadByName ¶
LoadByName loads a plugin by name from the plugins directory.
func (*Loader) SetRepoURL ¶
SetRepoURL sets the plugin registry URL.
Click to show internal directories.
Click to hide internal directories.