primea-abstract-container
Advanced tools
Comparing version 0.0.5 to 0.0.6
13
index.js
module.exports = class AbstractContainer { | ||
// The constructor is given an instance of the kernel | ||
// https://github.com/primea/js-primea-hypervisor/blob/master/docs/kernel.md | ||
constructor (kernel) { | ||
this.kernel = kernel | ||
// The constructor is given an instance of the actor | ||
// https://github.com/primea/js-primea-hypervisor/blob/master/docs/actor.md | ||
constructor (actor) { | ||
this.actor = actor | ||
} | ||
@@ -24,3 +24,2 @@ | ||
// This is called for each incoming message the container gets. | ||
// | ||
// Optionally it can return a single value. | ||
@@ -36,7 +35,7 @@ async onMessage (message) { | ||
onIdle () { | ||
// This tells the kernel that it is safe to freeze (aka turn off) this container. | ||
// This tells the actor that it is safe to freeze (aka turn off) this container. | ||
// This removes all references in memory and the next time this instance is | ||
// requested it has to be deserialised from storage and spinned up. This can be | ||
// a time consuming operation. | ||
this.kernel.shutdown() | ||
this.actor.shutdown() | ||
} | ||
@@ -43,0 +42,0 @@ |
{ | ||
"name": "primea-abstract-container", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Abstract Primea container", | ||
@@ -25,5 +25,4 @@ "scripts": { | ||
"devDependencies": { | ||
"standard": "10.0.2", | ||
"tape": "^4.5.1" | ||
"standard": "^10.0.3" | ||
} | ||
} |
@@ -11,2 +11,4 @@ # SYNOPSIS | ||
# LICENSE | ||
[MPL-2.0](https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2)) | ||
[MPL-2.0][LICENSE] | ||
[LICENSE]: https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1
14
2792
41