Documentation
¶
Index ¶
- func IsEntityNotFound(err error) bool
- func NewLocalPluginAdapter(local sdkclient.LocalPluginProvider) provider.ModelServiceProvider
- func NewRemotePluginAdapter(remote sdkclient.RemotePluginProvider) provider.ModelServiceProvider
- func SetGlobalPluginRegistry(registry *PluginRegistry)
- type FlavorRegistrar
- type PluginManifestWrapper
- type PluginRegistry
- func (r *PluginRegistry) CheckNewPluginAndLoaded() error
- func (r *PluginRegistry) DiscoverPlugins() error
- func (r *PluginRegistry) DownloadPlugin(pluginName string) (string, error)
- func (r *PluginRegistry) GetAllManifests() map[string]*PluginManifestWrapper
- func (r *PluginRegistry) GetLocalPluginProvider(name string) (sdkclient.LocalPluginProvider, error)
- func (r *PluginRegistry) GetPluginDir() string
- func (r *PluginRegistry) GetPluginManifest(name string) (*sdktypes.PluginManifest, error)
- func (r *PluginRegistry) GetPluginProvider(name string) (sdkclient.PluginProvider, error)
- func (r *PluginRegistry) GetPluginStatus(name string) int
- func (r *PluginRegistry) GetProvider(name string) (provider.ModelServiceProvider, error)
- func (r *PluginRegistry) GetRemotePluginProvider(name string) (sdkclient.RemotePluginProvider, error)
- func (r *PluginRegistry) ListAvailableProviders() []string
- func (r *PluginRegistry) RegisterPlugin(pluginName string, pluginPath string) error
- func (r *PluginRegistry) ScheduleLoadPlugin(ctx context.Context)
- func (r *PluginRegistry) SetFlavorRegistrar(registrar FlavorRegistrar)
- func (r *PluginRegistry) Shutdown()
- func (r *PluginRegistry) StopPluginProcess(name string) error
- func (r *PluginRegistry) UninstallPlugin(name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEntityNotFound ¶
IsEntityNotFound checks if the error indicates entity not found.
func NewLocalPluginAdapter ¶
func NewLocalPluginAdapter(local sdkclient.LocalPluginProvider) provider.ModelServiceProvider
NewLocalPluginAdapter creates a local plugin adapter.
func NewRemotePluginAdapter ¶
func NewRemotePluginAdapter(remote sdkclient.RemotePluginProvider) provider.ModelServiceProvider
NewRemotePluginAdapter creates a remote plugin adapter
func SetGlobalPluginRegistry ¶
func SetGlobalPluginRegistry(registry *PluginRegistry)
SetGlobalPluginRegistry sets the global plugin registry (should be called once at startup).
Types ¶
type FlavorRegistrar ¶
type FlavorRegistrar func(*sdktypes.PluginManifest) error
FlavorRegistrar is a callback function type for registering APIFlavors. Used for dependency injection to avoid circular dependencies.
type PluginManifestWrapper ¶
type PluginManifestWrapper struct {
Manifest *sdktypes.PluginManifest
Path string
}
PluginManifestWrapper wraps plugin manifest with path information.
type PluginRegistry ¶
type PluginRegistry struct {
// contains filtered or unexported fields
}
PluginRegistry manages plugin discovery, loading, caching, and lifecycle.
func GetGlobalPluginRegistry ¶
func GetGlobalPluginRegistry() *PluginRegistry
GetGlobalPluginRegistry returns the global plugin registry. Returns nil if not initialized.
func NewPluginRegistry ¶
func NewPluginRegistry(pluginDir string, ds datastore.Datastore) *PluginRegistry
NewPluginRegistry creates a new plugin registry.
func (*PluginRegistry) CheckNewPluginAndLoaded ¶ added in v0.7.1
func (r *PluginRegistry) CheckNewPluginAndLoaded() error
func (*PluginRegistry) DiscoverPlugins ¶
func (r *PluginRegistry) DiscoverPlugins() error
DiscoverPlugins discovers all plugins in the plugin directory. Scans the pluginDir directory and loads plugin.yaml from each subdirectory.
func (*PluginRegistry) DownloadPlugin ¶ added in v0.7.1
func (r *PluginRegistry) DownloadPlugin(pluginName string) (string, error)
func (*PluginRegistry) GetAllManifests ¶
func (r *PluginRegistry) GetAllManifests() map[string]*PluginManifestWrapper
GetAllManifests returns all discovered plugin manifests (for CLI display).
func (*PluginRegistry) GetLocalPluginProvider ¶
func (r *PluginRegistry) GetLocalPluginProvider(name string) (sdkclient.LocalPluginProvider, error)
GetLocalPluginProvider returns the Local plugin interface.
func (*PluginRegistry) GetPluginDir ¶ added in v0.7.1
func (r *PluginRegistry) GetPluginDir() string
func (*PluginRegistry) GetPluginManifest ¶
func (r *PluginRegistry) GetPluginManifest(name string) (*sdktypes.PluginManifest, error)
GetPluginManifest returns the plugin's manifest.
func (*PluginRegistry) GetPluginProvider ¶
func (r *PluginRegistry) GetPluginProvider(name string) (sdkclient.PluginProvider, error)
GetPluginProvider returns the plugin's base interface. All plugins implement the PluginProvider interface.
func (*PluginRegistry) GetPluginStatus ¶ added in v0.7.1
func (r *PluginRegistry) GetPluginStatus(name string) int
func (*PluginRegistry) GetProvider ¶
func (r *PluginRegistry) GetProvider(name string) (provider.ModelServiceProvider, error)
GetProvider returns the plugin Provider (implements ProviderFactory interface). Uses lazy loading with singleton pattern. Kept for backward compatibility; use GetPluginProvider() instead.
func (*PluginRegistry) GetRemotePluginProvider ¶
func (r *PluginRegistry) GetRemotePluginProvider(name string) (sdkclient.RemotePluginProvider, error)
GetRemotePluginProvider returns the Remote plugin interface.
func (*PluginRegistry) ListAvailableProviders ¶
func (r *PluginRegistry) ListAvailableProviders() []string
ListAvailableProviders lists all available plugins.
func (*PluginRegistry) RegisterPlugin ¶ added in v0.7.1
func (r *PluginRegistry) RegisterPlugin(pluginName string, pluginPath string) error
func (*PluginRegistry) ScheduleLoadPlugin ¶ added in v0.7.1
func (r *PluginRegistry) ScheduleLoadPlugin(ctx context.Context)
func (*PluginRegistry) SetFlavorRegistrar ¶
func (r *PluginRegistry) SetFlavorRegistrar(registrar FlavorRegistrar)
SetFlavorRegistrar sets the Flavor registration callback function. Uses dependency injection to avoid circular dependencies.
func (*PluginRegistry) Shutdown ¶
func (r *PluginRegistry) Shutdown()
Shutdown closes all plugins and cleans up registry state.
func (*PluginRegistry) StopPluginProcess ¶ added in v0.7.1
func (r *PluginRegistry) StopPluginProcess(name string) error
func (*PluginRegistry) UninstallPlugin ¶ added in v0.7.1
func (r *PluginRegistry) UninstallPlugin(name string) error