Documentation
¶
Index ¶
- type APIPlugin
- type BackupInfo
- type BackupPlugin
- type EnterprisePlugin
- type MonitoringPlugin
- type PluginLoader
- func (l *PluginLoader) GetAllPlugins() []EnterprisePlugin
- func (l *PluginLoader) GetPlugin(name string) (EnterprisePlugin, bool)
- func (l *PluginLoader) HealthCheckAll(ctx context.Context) map[string]error
- func (l *PluginLoader) LoadPluginsFromDir(ctx context.Context, dir string) error
- func (l *PluginLoader) StartAll(ctx context.Context) error
- func (l *PluginLoader) StopAll(ctx context.Context) error
- type PluginMetadata
- type StoragePlugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIPlugin ¶
type APIPlugin interface {
EnterprisePlugin
// RegisterRoutes adds plugin-specific API endpoints
// Returns a map of route path -> handler
RegisterRoutes() map[string]any
}
APIPlugin extends EnterprisePlugin for API-related features
type BackupInfo ¶
type BackupInfo struct {
ID string
Timestamp int64
Size int64
Location string
Metadata map[string]string
}
BackupInfo contains metadata about a backup
type BackupPlugin ¶
type BackupPlugin interface {
EnterprisePlugin
// Backup performs a backup operation
Backup(ctx context.Context, destination string) error
// Restore performs a restore operation
Restore(ctx context.Context, source string) error
// ListBackups returns available backups
ListBackups(ctx context.Context) ([]BackupInfo, error)
}
BackupPlugin extends EnterprisePlugin for backup features
type EnterprisePlugin ¶
type EnterprisePlugin interface {
// Name returns the plugin name (e.g., "cloudflare-vectorize", "r2-backup")
Name() string
// Version returns the plugin version
Version() string
// RequiredFeatures returns the edition features this plugin requires
RequiredFeatures() []string
// Initialize is called when the plugin is loaded
// The license parameter contains the validated Enterprise license
Initialize(ctx context.Context, license *licensing.License, config map[string]any) error
// Start begins plugin operation (called after all plugins are initialized)
Start(ctx context.Context) error
// Stop gracefully shuts down the plugin
Stop(ctx context.Context) error
// HealthCheck returns the plugin's health status
HealthCheck(ctx context.Context) error
}
EnterprisePlugin defines the interface for Enterprise feature plugins These plugins are loaded only when running Enterprise edition with valid license
type MonitoringPlugin ¶
type MonitoringPlugin interface {
EnterprisePlugin
// GetMetrics returns plugin-specific metrics
GetMetrics(ctx context.Context) (map[string]any, error)
}
MonitoringPlugin extends EnterprisePlugin for monitoring features
type PluginLoader ¶
type PluginLoader struct {
// contains filtered or unexported fields
}
PluginLoader manages Enterprise plugin loading and lifecycle
func NewPluginLoader ¶
func NewPluginLoader(license *licensing.License, logger *slog.Logger) *PluginLoader
NewPluginLoader creates a new plugin loader
func (*PluginLoader) GetAllPlugins ¶
func (l *PluginLoader) GetAllPlugins() []EnterprisePlugin
GetAllPlugins returns all loaded plugins
func (*PluginLoader) GetPlugin ¶
func (l *PluginLoader) GetPlugin(name string) (EnterprisePlugin, bool)
GetPlugin returns a plugin by name
func (*PluginLoader) HealthCheckAll ¶
func (l *PluginLoader) HealthCheckAll(ctx context.Context) map[string]error
HealthCheckAll runs health checks on all plugins
func (*PluginLoader) LoadPluginsFromDir ¶
func (l *PluginLoader) LoadPluginsFromDir(ctx context.Context, dir string) error
LoadPluginsFromDir loads all plugins from a directory Plugins should be .so files (Go plugins)
type PluginMetadata ¶
type PluginMetadata struct {
Name string
Version string
Description string
Author string
License string
RequiredFeatures []string
RequiredVersion string // Minimum GraphDB version required
}
PluginMetadata contains plugin information
type StoragePlugin ¶
type StoragePlugin interface {
EnterprisePlugin
// AttachToStorage integrates the plugin with the graph storage
AttachToStorage(storage *storage.GraphStorage) error
}
StoragePlugin extends EnterprisePlugin for storage-related features