git ssb

0+

wanderer🌟 / js-primea-hypervisor



Tree: dd779a4f0bc426d31cdaf5eb43ff37a91fd200c3

Files: dd779a4f0bc426d31cdaf5eb43ff37a91fd200c3 / hypervisor.js

528 bytesRaw
1const Kernel = require('./index.js')
2const codeHandlers = require('./codeHandler.js')
3
4module.exports = class Hypervisor {
5 constructor (graph, state, imports = []) {
6 this.state = state
7 this.graph = graph
8 this.root = new Kernel({
9 imports: imports,
10 graph: graph,
11 state: state
12 })
13 }
14
15 set (path, value) {
16 return this.graph.set(this.state, path, value)
17 }
18
19 send (message) {
20 return this.root.send(message)
21 }
22
23 addVM (type, handler) {
24 codeHandlers.handlers.type = handler
25 }
26}
27

Built with git-ssb-web