Files: 7c49768cb5203906b5e068c95f34fb506223c75f / docs / hypervisor.md
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
Table of Contents
- constructor
- send
- loadActor
- newActor
- createModule
- createActor
- createStateRoot
- setStateRoot
- registerModule
- registerDriver
constructor
The Hypervisor manages module instances by instantiating them and destroying them when possible. It also facilitates locating Containers
Parameters
opts
Objectopts.tree
Object a radix tree to store the stateopts.modules
Array an array of modules to registeropts.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 module is loaded
loadActor
loads an actor from the tree given its id
Parameters
id
ID
newActor
creates an actor from a module and code
Parameters
Returns ActorRef
createModule
creates a modref from a module and code
Parameters
mod
Module the modulecode
Buffer the codeid
id the id for the module (optional, default{nonce:this.nonce++,parent:null}
)
Returns ModuleRef
createActor
creates an instance of an Actor
Parameters
modRef
id
Object the id for the actor (optional, default{nonce:this.nonce++,parent:null}
)type
ModuleRef the modref
Returns ActorRef
createStateRoot
creates a state root when scheduler is idle
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
registerModule
registers a module with the hypervisor
Parameters
Constructor
Function the module's constructor
registerDriver
register a driver with the hypervisor
Parameters
driver
Driver
Built with git-ssb-web