git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit dc3270233dd1c56140f13fa0a8f4642baa134d81

updated docs

wanderer committed on 11/21/2017, 11:51:15 PM
Parent: 54682dbb20afd58e4292b4d018b5724bbdf68516

Files changed

docs/actor.mdchanged
docs/capsManager.mdchanged
docs/hypervisor.mdchanged
docs/inbox.mdchanged
docs/scheduler.mdchanged
docs/actor.mdView
@@ -7,31 +7,31 @@
77 - [queue](#queue)
88 - [create](#create)
99 - [shutdown](#shutdown)
1010 - [startup](#startup)
11-- [message](#message)
11+- [runMessage](#runmessage)
1212 - [incrementTicks](#incrementticks)
1313 - [createActor](#createactor)
1414 - [send](#send)
1515
1616 ## constructor
1717
18-[actor.js:15-31](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/actor.js#L15-L31 "Source code on GitHub")
18+[actor.js:15-31](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/actor.js#L15-L31 "Source code on GitHub")
1919
20-the Kernel manages the varous message passing functions and provides
20+the Actor manages the varous message passing functions and provides
2121 an interface for the containers to use
2222
2323 **Parameters**
2424
2525 - `opts` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
26- - `opts.id` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the UUID of the Kernel
26+ - `opts.id` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the UUID of the Actor
2727 - `opts.state` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the state of the container
2828 - `opts.hypervisor` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the instance of the hypervisor
2929 - `opts.container` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the container constuctor and argments
3030
3131 ## mintCap
3232
33-[actor.js:38-43](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/actor.js#L38-L43 "Source code on GitHub")
33+[actor.js:38-43](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/actor.js#L38-L43 "Source code on GitHub")
3434
3535 Mints a new capabilitly with a given tag
3636
3737 **Parameters**
@@ -41,9 +41,9 @@
4141 Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
4242
4343 ## queue
4444
45-[actor.js:50-53](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/actor.js#L50-L53 "Source code on GitHub")
45+[actor.js:50-53](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/actor.js#L50-L53 "Source code on GitHub")
4646
4747 adds a message to this containers message queue
4848
4949 **Parameters**
@@ -52,9 +52,9 @@
5252 - `portName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**
5353
5454 ## create
5555
56-[actor.js:60-63](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/actor.js#L60-L63 "Source code on GitHub")
56+[actor.js:60-66](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/actor.js#L60-L66 "Source code on GitHub")
5757
5858 runs the creation routine for the actor
5959
6060 **Parameters**
@@ -64,21 +64,21 @@
6464 Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)**
6565
6666 ## shutdown
6767
68-[actor.js:92-94](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/actor.js#L92-L94 "Source code on GitHub")
68+[actor.js:95-97](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/actor.js#L95-L97 "Source code on GitHub")
6969
7070 Runs the shutdown routine for the actor
7171
7272 ## startup
7373
74-[actor.js:99-101](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/actor.js#L99-L101 "Source code on GitHub")
74+[actor.js:102-104](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/actor.js#L102-L104 "Source code on GitHub")
7575
7676 Runs the startup routine for the actor
7777
78-## message
78+## runMessage
7979
80-[actor.js:109-130](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/actor.js#L109-L130 "Source code on GitHub")
80+[actor.js:112-132](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/actor.js#L112-L132 "Source code on GitHub")
8181
8282 run the Actor with a given message
8383
8484 **Parameters**
@@ -89,9 +89,9 @@
8989 Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)**
9090
9191 ## incrementTicks
9292
93-[actor.js:136-139](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/actor.js#L136-L139 "Source code on GitHub")
93+[actor.js:138-141](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/actor.js#L138-L141 "Source code on GitHub")
9494
9595 updates the number of ticks that the container has run
9696
9797 **Parameters**
@@ -99,9 +99,9 @@
9999 - `count` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** the number of ticks to add
100100
101101 ## createActor
102102
103-[actor.js:146-149](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/actor.js#L146-L149 "Source code on GitHub")
103+[actor.js:148-151](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/actor.js#L148-L151 "Source code on GitHub")
104104
105105 creates an actor
106106
107107 **Parameters**
@@ -110,9 +110,9 @@
110110 - `message` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** an intial [message](https://github.com/primea/js-primea-message) to send newly created actor
111111
112112 ## send
113113
114-[actor.js:166-172](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/actor.js#L166-L172 "Source code on GitHub")
114+[actor.js:168-174](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/actor.js#L168-L174 "Source code on GitHub")
115115
116116 sends a message to a given port
117117
118118 **Parameters**
docs/capsManager.mdView
@@ -8,45 +8,50 @@
88 - [delete](#delete)
99
1010 ## constructor
1111
12-[capsManager.js:7-10](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/capsManager.js#L7-L10 "Source code on GitHub")
12+[capsManager.js:10-12](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/capsManager.js#L10-L12 "Source code on GitHub")
1313
14-The caps manager manages perstantly stores the capabilities
14+The port manager manages the the ports. This inculdes creation, deletion
1515 fetching and waiting on ports
1616
1717 **Parameters**
1818
19-- `caps` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
19+- `caps`
20+- `opts` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
21+ - `opts.state` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
22+ - `opts.hypervisor` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
23+ - `opts.exoInterface` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
2024
2125 ## store
2226
23-[capsManager.js:17-19](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/capsManager.js#L17-L19 "Source code on GitHub")
27+[capsManager.js:19-22](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/capsManager.js#L19-L22 "Source code on GitHub")
2428
25-Stores a capability persistantly
29+binds a port to a name
2630
2731 **Parameters**
2832
29-- `key` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**
30-- `cap` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
33+- `name` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the name of the port
34+- `cap`
35+- `port` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the port to bind
3136
3237 ## get
3338
34-[capsManager.js:26-29](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/capsManager.js#L26-L29 "Source code on GitHub")
39+[capsManager.js:29-32](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/capsManager.js#L29-L32 "Source code on GitHub")
3540
36-gets a cap given it's key
41+gets a port given it's name
3742
3843 **Parameters**
3944
40-- `key` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**
45+- `name` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**
4146
4247 Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
4348
4449 ## delete
4550
46-[capsManager.js:35-37](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/capsManager.js#L35-L37 "Source code on GitHub")
51+[capsManager.js:38-40](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/capsManager.js#L38-L40 "Source code on GitHub")
4752
48-delete an cap given its key
53+delete an port given the name it is bound to
4954
5055 **Parameters**
5156
52-- `key` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**
57+- `name` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**
docs/hypervisor.mdView
@@ -10,9 +10,9 @@
1010 - [registerContainer](#registercontainer)
1111
1212 ## constructor
1313
14-[index.js:10-15](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/index.js#L10-L15 "Source code on GitHub")
14+[index.js:10-15](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/index.js#L10-L15 "Source code on GitHub")
1515
1616 The Hypervisor manages the container instances by instantiating them and
1717 destorying them when possible. It also facilitates localating Containers
1818
@@ -21,9 +21,9 @@
2121 - `tree` **Tree** a [radix tree](https://github.com/dfinity/js-dfinity-radix-tree) to store the state
2222
2323 ## send
2424
25-[index.js:23-27](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/index.js#L23-L27 "Source code on GitHub")
25+[index.js:23-27](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/index.js#L23-L27 "Source code on GitHub")
2626
2727 sends a message
2828
2929 **Parameters**
@@ -34,9 +34,9 @@
3434 Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** a promise that resolves once the receiving container is loaded
3535
3636 ## getActor
3737
38-[index.js:52-63](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/index.js#L52-L63 "Source code on GitHub")
38+[index.js:52-63](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/index.js#L52-L63 "Source code on GitHub")
3939
4040 gets an existsing actor
4141
4242 **Parameters**
@@ -46,9 +46,9 @@
4646 Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)**
4747
4848 ## createActor
4949
50-[index.js:71-95](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/index.js#L71-L95 "Source code on GitHub")
50+[index.js:71-95](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/index.js#L71-L95 "Source code on GitHub")
5151
5252 creates an instance of an Actor
5353
5454 **Parameters**
@@ -58,9 +58,9 @@
5858 - `id` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the id for the actor (optional, default `{nonce:this.nonce,parent:null}`)
5959
6060 ## createStateRoot
6161
62-[index.js:108-111](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/index.js#L108-L111 "Source code on GitHub")
62+[index.js:108-111](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/index.js#L108-L111 "Source code on GitHub")
6363
6464 creates a state root starting from a given container and a given number of
6565 ticks
6666
@@ -71,13 +71,13 @@
7171 Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)**
7272
7373 ## registerContainer
7474
75-[index.js:119-124](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/index.js#L119-L124 "Source code on GitHub")
75+[index.js:119-124](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/index.js#L119-L124 "Source code on GitHub")
7676
7777 regirsters a container with the hypervisor
7878
7979 **Parameters**
8080
8181 - `Constructor` **Class** a Class for instantiating the container
8282 - `args` **any** any args that the contructor takes
83-- `typeId` **Interger** the container's type identification ID (optional, default `Constructor.typeId`)
83+- `typeId` **Integer** the container's type identification ID (optional, default `Constructor.typeId`)
docs/inbox.mdView
@@ -3,14 +3,14 @@
33 ### Table of Contents
44
55 - [constructor](#constructor)
66 - [queue](#queue)
7-- [waitOnTag](#waitontag)
8-- [getNextMessage](#getnextmessage)
7+- [nextTaggedMessage](#nexttaggedmessage)
8+- [nextMessage](#nextmessage)
99
1010 ## constructor
1111
12-[inbox.js:12-20](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/inbox.js#L12-L20 "Source code on GitHub")
12+[inbox.js:23-31](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/inbox.js#L23-L31 "Source code on GitHub")
1313
1414 The inbox manages and sorts incoming messages and provides functions
1515 to wait on messages
1616
@@ -21,19 +21,19 @@
2121 - `opts.hypervisor` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
2222
2323 ## queue
2424
25-[inbox.js:26-36](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/inbox.js#L26-L36 "Source code on GitHub")
25+[inbox.js:37-47](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/inbox.js#L37-L47 "Source code on GitHub")
2626
2727 queues a message
2828
2929 **Parameters**
3030
3131 - `message` **Message**
3232
33-## waitOnTag
33+## nextTaggedMessage
3434
35-[inbox.js:44-59](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/inbox.js#L44-L59 "Source code on GitHub")
35+[inbox.js:55-66](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/inbox.js#L55-L66 "Source code on GitHub")
3636
3737 Waits for a message sent with a capablitly that has one of the given tags
3838
3939 **Parameters**
@@ -42,11 +42,11 @@
4242 - `timeout` **Integer**
4343
4444 Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)**
4545
46-## getNextMessage
46+## nextMessage
4747
48-[inbox.js:66-95](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/inbox.js#L66-L95 "Source code on GitHub")
48+[inbox.js:73-109](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/inbox.js#L73-L109 "Source code on GitHub")
4949
5050 Waits for the the next message if any
5151
5252 **Parameters**
docs/scheduler.mdView
@@ -11,16 +11,16 @@
1111 - [leastNumberOfTicks](#leastnumberofticks)
1212
1313 ## constructor
1414
15-[scheduler.js:10-19](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/scheduler.js#L10-L19 "Source code on GitHub")
15+[scheduler.js:14-20](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/scheduler.js#L14-L20 "Source code on GitHub")
1616
1717 The Scheduler manages the run cycle of Actors and figures out which
1818 order they should run in
1919
2020 ## lock
2121
22-[scheduler.js:26-28](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/scheduler.js#L26-L28 "Source code on GitHub")
22+[scheduler.js:27-29](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/scheduler.js#L27-L29 "Source code on GitHub")
2323
2424 locks the scheduler from clearing waits untill the lock is resolved
2525
2626 **Parameters**
@@ -30,9 +30,9 @@
3030 Returns **[function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** the resolve function to call once it to unlock
3131
3232 ## update
3333
34-[scheduler.js:34-39](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/scheduler.js#L34-L39 "Source code on GitHub")
34+[scheduler.js:35-40](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/scheduler.js#L35-L40 "Source code on GitHub")
3535
3636 updates an instance with a new tick count
3737
3838 **Parameters**
@@ -40,9 +40,9 @@
4040 - `instance` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** an actor instance
4141
4242 ## getInstance
4343
44-[scheduler.js:51-53](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/scheduler.js#L51-L53 "Source code on GitHub")
44+[scheduler.js:52-54](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/scheduler.js#L52-L54 "Source code on GitHub")
4545
4646 returns an Actor instance
4747
4848 **Parameters**
@@ -52,9 +52,9 @@
5252 Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
5353
5454 ## done
5555
56-[scheduler.js:59-63](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/scheduler.js#L59-L63 "Source code on GitHub")
56+[scheduler.js:60-64](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/scheduler.js#L60-L64 "Source code on GitHub")
5757
5858 deletes an instance from the scheduler
5959
6060 **Parameters**
@@ -62,9 +62,9 @@
6262 - `id` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the containers id
6363
6464 ## wait
6565
66-[scheduler.js:72-86](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/scheduler.js#L72-L86 "Source code on GitHub")
66+[scheduler.js:73-83](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/scheduler.js#L73-L83 "Source code on GitHub")
6767
6868 returns a promise that resolves once all containers have reached the given
6969 number of ticks
7070
@@ -76,9 +76,9 @@
7676 Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)**
7777
7878 ## leastNumberOfTicks
7979
80-[scheduler.js:92-101](https://github.com/primea/js-primea-hypervisor/blob/1623d0570d9d2c2c1859ca73c05054596cccf553/scheduler.js#L92-L101 "Source code on GitHub")
80+[scheduler.js:89-98](https://github.com/primea/js-primea-hypervisor/blob/54682dbb20afd58e4292b4d018b5724bbdf68516/scheduler.js#L89-L98 "Source code on GitHub")
8181
8282 returns the oldest container's ticks
8383
8484 **Parameters**

Built with git-ssb-web