vms

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: BSD-3-Clause Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory interface {
	New(*snow.Context) (interface{}, error)
}

A Factory creates new instances of a VM

type Manager

type Manager interface {
	ids.Aliaser

	// Returns a factory that can create new instances of the VM
	// with the given ID
	GetFactory(ids.ID) (Factory, error)

	// Associate an ID with the factory that creates new instances
	// of the VM with the given ID
	RegisterFactory(ids.ID, Factory) error

	// Versions returns the versions of all the VMs that have been registered
	Versions() (map[string]string, error)
}

Manager is a VM manager. It has the following functionality:

  1. 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.
  2. Get a VM factory. Given the ID of a VM that has been registered, return the factory that the ID is associated with.
  3. Manage the aliases of VMs

func NewManager

func NewManager(apiServer *server.Server, log logging.Logger) Manager

NewManager returns an instance of a VM manager

Jump to

Keyboard shortcuts

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