Files: b9146a54337ee2e23648e5af29faaff8c1737969 / docs / hypervisor.md
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
Table of Contents
- constructor
- send
- loadActor
- createActor
- createStateRoot
- setStateRoot
- registerContainer
- registerDriver
constructor
The Hypervisor manages the container instances by instantiating them and destorying them when possible. It also facilitates localating Containers
Parameters
opts
Objectopts.tree
Object a radix tree to store the stateopts.container
Array an array of containers to regesteropts.drivers
Array an array of drivers to installopts.meter
boolean whether to meter gas or not (optional, defaulttrue
)
send
sends a message(s). If an array of message is given the all the messages will be sent at once
Parameters
Returns Promise a promise that resolves once the receiving container is loaded
loadActor
loads an actor from the tree given its id
Parameters
id
ID
createActor
creates an instance of an Actor
Parameters
type
Integer the type id for the containercode
id
Object the id for the actor (optional, default{nonce:this.nonce++,parent:null}
)message
Object an intial message to send newly created actor
createStateRoot
creates a state root starting from a given container and a given number of ticks
Parameters
ticks
Number the number of ticks at which to create the state root
Returns Promise
setStateRoot
set the state root. The promise must resolve before creating or sending any more messages to the hypervisor
Parameters
stateRoot
Buffer
Returns Promise
registerContainer
regesters a container with the hypervisor
Parameters
Constructor
Function the container's constuctor
registerDriver
register a driver with the hypervisor
Parameters
driver
driver
Built with git-ssb-web