Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotPlugin = errors.New("not a plugin") ErrNotVM = errors.New("does not implement VM interface") )
Functions ¶
This section is empty.
Types ¶
type VMGetter ¶
type VMGetter interface {
// Get returns the VM factory for the given plugin path
Get(pluginPath string) (vms.Factory, error)
}
VMGetter provides a method to get VMs from plugins
func NewVMGetter ¶
func NewVMGetter(config VMGetterConfig) VMGetter
NewVMGetter returns a new VMGetter
type VMGetterConfig ¶
type VMGetterConfig struct {
FileReader filesystem.Reader
Manager vms.Manager
PluginDirectory string
ProcessTracker resource.ProcessTracker
RuntimeTracker runtime.Tracker
MetricsGatherer metric.MultiGatherer
}
VMGetterConfig configures the VMGetter
type VMRegistry ¶
type VMRegistry interface {
// Reload causes all VM plugins in the plugin directory to be loaded
// Returns:
// 1) slice of newly loaded VM IDs
// 2) map of vmID -> error for VMs that failed to load
// 3) general error if reload failed
Reload(ctx context.Context) ([]ids.ID, map[ids.ID]error, error)
}
VMRegistry provides functionality to load VMs from plugins
func NewVMRegistry ¶
func NewVMRegistry(config VMRegistryConfig) VMRegistry
NewVMRegistry returns a new VMRegistry
type VMRegistryConfig ¶
VMRegistryConfig configures the VMRegistry
Click to show internal directories.
Click to hide internal directories.