Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("not found")
)
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface {
ids.Aliaser
// Return a factory that can create new instances of the vm whose ID is
// [vmID]
GetFactory(vmID ids.ID) (Factory, error)
// Map [vmID] to [factory]. [factory] creates new instances of the vm whose
// ID is [vmID]
RegisterFactory(vmID ids.ID, factory Factory) error
// ListFactories returns all the IDs that have had factories registered.
ListFactories() ([]ids.ID, error)
// Versions returns the primary alias of the VM mapped to the reported
// version of the VM for all the registered VMs that reported versions.
Versions() (map[string]string, error)
}
Manager tracks a collection of VM factories, their aliases, and their versions. It has the following functionality:
- Register a VM factory. To register a VM is to associate its ID with a VMFactory which, when New() is called upon it, creates a new instance of that VM.
- Get a VM factory. Given the ID of a VM that has been registered, return the factory that the ID is associated with.
- Manage the aliases of VMs
- Manage the versions of VMs
Click to show internal directories.
Click to hide internal directories.