plugin

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

README

plugin

Plugin system that enables extensibility of the Launchrail application through dynamically loaded modules.

Notes

  • Provides infrastructure for loading and running Go plugins
  • Implements plugin discovery and registration mechanisms
  • Manages plugin lifecycle (initialization, execution, cleanup)
  • Ensures type safety when working with plugin interfaces
  • Supports hot-reloading of plugins for development workflow
  • Includes plugin validation to prevent incompatible plugins
  • Handles errors gracefully when plugins fail to load or execute
  • Provides a consistent API for plugins to interact with the core system

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CompilePlugins = CompileAllPlugins

CompilePlugins is a function variable that points to CompileAllPlugins by default. It can be overridden in tests to mock plugin compilation.

Functions

func CheckDirForGoFiles added in v0.2.1

func CheckDirForGoFiles(dirPath string) (bool, error)

CheckDirForGoFiles checks if a directory contains any .go files.

func CompileAllPlugins added in v0.2.0

func CompileAllPlugins(pluginsSourceDir, pluginsOutputDir string, logger logf.Logger) error

CompileAllPlugins finds Go plugin source directories and compiles them.

Types

type Manager

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

func NewManager

func NewManager(log logf.Logger, cfg *config.Config) *Manager

func (*Manager) GetPlugins

func (m *Manager) GetPlugins() []pluginapi.SimulationPlugin

func (*Manager) LoadPlugin

func (m *Manager) LoadPlugin(pluginPath string) error

Jump to

Keyboard shortcuts

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