Help us shape the future of Go! Take the 2026 Go Developer Survey

registry

package
v1.36.184 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: BSD-3-Clause Imports: 12 Imported by: 0

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

type VMRegistryConfig struct {
	VMGetter  VMGetter
	VMManager vms.Manager
}

VMRegistryConfig configures the VMRegistry

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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