git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit f6890c630f97bee18c05dac66e886069049ec4ab

remove clists

wanderer committed on 11/21/2017, 9:19:47 PM
Parent: ad6bbae474f448eb00580387b1481ebbe00ba1d6

Files changed

actor.jschanged
capsManager.jschanged
actor.jsView
@@ -125,9 +125,8 @@
125125 this.send(responseCap, new Message({
126126 data: result
127127 }))
128128 }
129- this.caps.clist.clear()
130129 }
131130
132131 /**
133132 * updates the number of ticks that the container has run
capsManager.jsView
@@ -1,38 +1,41 @@
11 module.exports = class CapsManager {
22 /**
3- * The caps manager manages perstantly stores the capabilities
3+ * The port manager manages the the ports. This inculdes creation, deletion
44 * fetching and waiting on ports
5- * @param {Object} caps
5+ * @param {Object} opts
6+ * @param {Object} opts.state
7+ * @param {Object} opts.hypervisor
8+ * @param {Object} opts.exoInterface
69 */
710 constructor (caps) {
811 this._storedCaps = caps
9- this.clist = new Set()
1012 }
1113
1214 /**
13- * Stores a capability persistantly
14- * @param {String} key
15- * @param {Object} cap
15+ * binds a port to a name
16+ * @param {Object} port - the port to bind
17+ * @param {String} name - the name of the port
1618 */
17- store (key, cap) {
18- this._storedCaps[key] = cap
19+ store (name, cap) {
20+ // save the port instance
21+ this._storedCaps[name] = cap
1922 }
2023
2124 /**
22- * gets a cap given it's key
23- * @param {String} key
25+ * gets a port given it's name
26+ * @param {String} name
2427 * @return {Object}
2528 */
26- get (key) {
27- const cap = this._storedCaps[key]
29+ get (name) {
30+ const cap = this._storedCaps[name]
2831 return cap
2932 }
3033
3134 /**
32- * delete an cap given its key
33- * @param {string} key
35+ * delete an port given the name it is bound to
36+ * @param {string} name
3437 */
35- delete (key) {
36- delete this._storedCaps[key]
38+ delete (name) {
39+ delete this._storedCaps[name]
3740 }
3841 }

Built with git-ssb-web