Documentation
¶
Index ¶
- func CheckDependencies(name string) error
- func DisableExtension(name string) error
- func EnableExtension(name string) error
- func GetExtensionStatus() map[string]string
- func InitExtensionManager() error
- func InstallExtension(name string) error
- func StartExtension(name string) error
- func StopExtension(name string) error
- func UninstallExtension(name string) error
- type BaseExtension
- type Extension
- type ExtensionHealth
- type ExtensionInterface
- type Manager
- type PluginHealth
- type PythonExtension
- func (e *PythonExtension) ExecuteFunction(name string, args ...interface{}) (interface{}, error)
- func (e *PythonExtension) IsRunning() bool
- func (e *PythonExtension) ReceiveMessage() (interface{}, error)
- func (e *PythonExtension) SendMessage(msg interface{}) error
- func (e *PythonExtension) Start() error
- func (e *PythonExtension) Status() string
- func (e *PythonExtension) Stop() error
- type PythonManager
- func (m *PythonManager) DisablePlugin(name string) error
- func (m *PythonManager) EnablePlugin(name string) error
- func (m *PythonManager) ExecutePlugin(ctx context.Context, name string, data interface{}) (interface{}, error)
- func (m *PythonManager) InstallPlugin(name, source string) error
- func (m *PythonManager) ListPlugins() ([]*PythonPlugin, error)
- func (m *PythonManager) LoadPlugin(name string) (*PythonPlugin, error)
- func (m *PythonManager) StartPlugin(name string) error
- func (m *PythonManager) StopPlugin(name string) error
- func (m *PythonManager) UninstallPlugin(name string) error
- type PythonPlugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDependencies ¶
CheckDependencies checks if all dependencies are satisfied
func DisableExtension ¶
DisableExtension disables an extension
func GetExtensionStatus ¶
GetExtensionStatus returns the status of all extensions
func InitExtensionManager ¶
func InitExtensionManager() error
InitExtensionManager initializes the extension manager
func InstallExtension ¶
InstallExtension installs a new extension
func UninstallExtension ¶
UninstallExtension removes an installed extension
Types ¶
type BaseExtension ¶
BaseExtension provides common fields for extensions. It is intended to be embedded in specific extension types.
type Extension ¶
type Extension struct {
Name string
Version string
Description string
Plugin *plugin.Plugin
Enabled bool
Interface ExtensionInterface
Dependencies []string
Status string
// contains filtered or unexported fields
}
Extension represents a loaded extension
func GetExtension ¶
GetExtension returns an extension by name
func ListExtensions ¶
ListExtensions returns all available extensions
type ExtensionHealth ¶
type ExtensionHealth struct {
LastHeartbeat time.Time
Status string
Error error
// contains filtered or unexported fields
}
ExtensionHealth tracks extension process health
type ExtensionInterface ¶
type ExtensionInterface interface {
Start() error
Stop() error
Status() string
IsRunning() bool
Name() string
Version() string
Dependencies() []string
}
ExtensionInterface defines the interface that all extensions must implement
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles the loading and management of extensions
type PluginHealth ¶
type PluginHealth struct {
LastHeartbeat time.Time
Status string
Error error
// contains filtered or unexported fields
}
PluginHealth tracks plugin process health
type PythonExtension ¶
type PythonExtension struct {
BaseExtension
// contains filtered or unexported fields
}
PythonExtension represents a Python-based extension
func NewPythonExtension ¶
func NewPythonExtension(name, version, description, scriptPath string) *PythonExtension
NewPythonExtension creates a new Python extension
func (*PythonExtension) ExecuteFunction ¶
func (e *PythonExtension) ExecuteFunction(name string, args ...interface{}) (interface{}, error)
ExecuteFunction calls a Python function with arguments
func (*PythonExtension) IsRunning ¶
func (e *PythonExtension) IsRunning() bool
IsRunning checks if the extension process is running
func (*PythonExtension) ReceiveMessage ¶
func (e *PythonExtension) ReceiveMessage() (interface{}, error)
ReceiveMessage receives a message from the Python process
func (*PythonExtension) SendMessage ¶
func (e *PythonExtension) SendMessage(msg interface{}) error
SendMessage sends a message to the Python process
func (*PythonExtension) Start ¶
func (e *PythonExtension) Start() error
Start initializes and starts the Python extension
func (*PythonExtension) Status ¶
func (e *PythonExtension) Status() string
Status returns the current status of the extension
func (*PythonExtension) Stop ¶
func (e *PythonExtension) Stop() error
Stop gracefully stops the Python extension
type PythonManager ¶
type PythonManager struct {
// contains filtered or unexported fields
}
PythonManager handles Python extension management
func NewPythonManager ¶
func NewPythonManager(pluginsDir string) (*PythonManager, error)
NewPythonManager creates a new Python extension manager
func (*PythonManager) DisablePlugin ¶
func (m *PythonManager) DisablePlugin(name string) error
DisablePlugin disables a Python extension plugin
func (*PythonManager) EnablePlugin ¶
func (m *PythonManager) EnablePlugin(name string) error
EnablePlugin enables a Python extension plugin
func (*PythonManager) ExecutePlugin ¶
func (m *PythonManager) ExecutePlugin(ctx context.Context, name string, data interface{}) (interface{}, error)
ExecutePlugin executes a Python plugin with data exchange
func (*PythonManager) InstallPlugin ¶
func (m *PythonManager) InstallPlugin(name, source string) error
InstallPlugin installs a Python extension plugin
func (*PythonManager) ListPlugins ¶
func (m *PythonManager) ListPlugins() ([]*PythonPlugin, error)
ListPlugins lists all installed Python plugins
func (*PythonManager) LoadPlugin ¶
func (m *PythonManager) LoadPlugin(name string) (*PythonPlugin, error)
LoadPlugin loads a Python extension plugin
func (*PythonManager) StartPlugin ¶
func (m *PythonManager) StartPlugin(name string) error
StartPlugin starts a Python plugin with IPC
func (*PythonManager) StopPlugin ¶
func (m *PythonManager) StopPlugin(name string) error
StopPlugin stops a running Python plugin
func (*PythonManager) UninstallPlugin ¶
func (m *PythonManager) UninstallPlugin(name string) error
UninstallPlugin uninstalls a Python extension plugin