pluginloader

package
v0.0.0-...-73ae4b5 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

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

func NewPluginLoader

func NewPluginLoader(
	afs afero.Fs,
	processHandler interfaces.PluginProcessHandler,
	supportedPlugins common.PluginList,
) *Loader

func (*Loader) FileExtensionsForFileFormat

func (l *Loader) FileExtensionsForFileFormat(
	format fileformat.Format,
) ([]string, error)

func (*Loader) FileFormatForFileExtension

func (l *Loader) FileFormatForFileExtension(fileExtension string) (fileformat.Format, error)

func (*Loader) LoadPluginsFromDir

func (l *Loader) LoadPluginsFromDir(
	pluginsDir string,
) error

func (*Loader) LoadedPlugins

func (l *Loader) LoadedPlugins() []*messages.PluginInfoResponse

func (*Loader) PluginForFileExtension

func (l *Loader) PluginForFileExtension(
	fileExtension string,
) (plugininterfaces.LimePipesPlugin, error)

PluginForFileExtension returns the plugin that can handle the given file extension. nolint: ireturn linter exception is ok here, as the PluginLoader interface returns an interface here

func (*Loader) UnloadPlugins

func (l *Loader) UnloadPlugins() error

type ProcessHandler

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

func NewProcessHandler

func NewProcessHandler(
	supportedPlugins lpcommon.PluginList,
) *ProcessHandler

func (*ProcessHandler) GetPlugin

func (p *ProcessHandler) GetPlugin(
	pluginID string,
) (plugininterfaces.LimePipesPlugin, error)

GetPlugin returns a plugin by its ID nolint: ireturn linter exception is ok here, as the PluginProcessHandler interface returns an interface here

func (*ProcessHandler) KillPlugins

func (p *ProcessHandler) KillPlugins() error

func (*ProcessHandler) RunPlugin

func (p *ProcessHandler) RunPlugin(
	pluginID string,
	executablePath string,
) error

Jump to

Keyboard shortcuts

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