Files: b507f49239a73767abbee979b4e637a6ca469764 / docs / hypervisor.md
4637 bytesRaw
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
Table of Contents
- constructor
- getInstanceByPath
- getInstanceByPort
- wait
- createInstance
- createStateRoot
- registerContainer
constructor
The Hypervisor manages the container instances by instantiating them and destorying them when possible. It also facilitates localating Containers
Parameters
dag
Graph an instance of ipfs.dag
getInstanceByPath
get a container by its path
Parameters
getInstanceByPort
get a contrainer instance given its entry port and its mounting port
Parameters
port
Object the entry port for the containerparentPort
Object the entry port of the parent container
wait
given a port, wait untill its source contract has reached the threshold tick count
Parameters
port
Object the port to wait onthreshold
Number the number of ticks to wait before resolvingfromPort
Object the entryPort of the container requesting the wait. Used internally so that waits don't become cyclic
createInstance
creates an instance given the container type, starting state, entry port and the parentPort
Parameters
type
state
entryPort
(optional, defaultnull
)parentPort
the
String type of VM to loadthe
Object starting state of the VMthe
Object entry portthe
Object parent port
createStateRoot
creates a state root starting from a given container and a given number of ticks
Parameters
container
Container an container instanceticks
Number the number of ticks at which to create the state root
Returns Promise
registerContainer
regirsters a container with the hypervisor
Parameters
type
vm
the
String name of the typea
Class Class for instantiating the container
Built with git-ssb-web