git ssb

0+

wanderer🌟 / js-primea-abstract-container



Commit a3adeae363747c55b468a017123cfbb88630f134

rename kernel -> actor

wanderer committed on 11/21/2017, 9:23:33 PM
Parent: 3df38a0c09431767d73e05b496833e907b6826ff

Files changed

README.mdchanged
index.jschanged
package.jsonchanged
README.mdView
@@ -7,5 +7,7 @@
77 # INSTALL
88 clone and run `npm install`
99
1010 # LICENSE
11-[MPL-2.0](https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2))
11 +[MPL-2.0][LICENSE]
12 +
13 +[LICENSE]: https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2)
index.jsView
@@ -1,9 +1,9 @@
11 module.exports = class AbstractContainer {
2- // The constructor is given an instance of the kernel
3- // https://github.com/primea/js-primea-hypervisor/blob/master/docs/kernel.md
4- constructor (kernel) {
5- this.kernel = kernel
2 + // The constructor is given an instance of the actor
3 + // https://github.com/primea/js-primea-hypervisor/blob/master/docs/actor.md
4 + constructor (actor) {
5 + this.actor = actor
66 }
77
88 // This method runs once when the container is initially created.
99 //
@@ -20,9 +20,8 @@
2020 // was requested in onIdle.
2121 async onStartup () {}
2222
2323 // This is called for each incoming message the container gets.
24- //
2524 // Optionally it can return a single value.
2625 async onMessage (message) {
2726 throw new Error('Unimplemented message: ' + message.data)
2827 }
@@ -31,13 +30,13 @@
3130 // in the incoming queue for the container to receive.
3231 //
3332 // This can be overriden by a subclass.
3433 onIdle () {
35- // This tells the kernel that it is safe to freeze (aka turn off) this container.
34 + // This tells the actor that it is safe to freeze (aka turn off) this container.
3635 // This removes all references in memory and the next time this instance is
3736 // requested it has to be deserialised from storage and spinned up. This can be
3837 // a time consuming operation.
39- this.kernel.shutdown()
38 + this.actor.shutdown()
4039 }
4140
4241 // each container type used in a hypervisor instance must have a different
4342 // id defined as an interger. This can be overriden at the time the container is registered with the hypervisor.
package.jsonView
@@ -21,8 +21,8 @@
2121 "author": "mjbecze <mjbecze@gmail.com>",
2222 "contributors": "Alex Beregszaszi <alex@rtfs.hu>",
2323 "license": "MPL-2.0",
2424 "devDependencies": {
25- "standard": "10.0.2",
25 + "standard": "^10.0.3",
2626 "tape": "^4.5.1"
2727 }
2828 }

Built with git-ssb-web