Commit d4cfbd48b828917f70d5680efb0a6567637efcdb
build docs
Signed-off-by: wanderer <mjbecze@gmail.com>wanderer committed on 8/16/2017, 5:46:04 PM
Parent: add087e94722a8b77695d21eca754a562d7e79f5
Files changed
docs/hypervisor.md | changed |
docs/kernel.md | changed |
docs/portManager.md | changed |
docs/scheduler.md | changed |
docs/hypervisor.md | ||
---|---|---|
@@ -11,21 +11,21 @@ | ||
11 | 11 … | - [registerContainer](#registercontainer) |
12 | 12 … | |
13 | 13 … | ## constructor |
14 | 14 … | |
15 | -[index.js:16-22](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/index.js#L16-L22 "Source code on GitHub") | |
15 … | +[index.js:16-29](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/index.js#L16-L29 "Source code on GitHub") | |
16 | 16 … | |
17 | 17 … | The Hypervisor manages the container instances by instantiating them and |
18 | 18 … | destorying them when possible. It also facilitates localating Containers |
19 | 19 … | |
20 | 20 … | **Parameters** |
21 | 21 … | |
22 | 22 … | - `dag` **Graph** an instance of [ipfs.dag](https://github.com/ipfs/interface-ipfs-core/tree/master/API/dag#dag-api) |
23 | -- `state` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the starting state (optional, default `{}`) | |
23 … | +- `state` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the starting state (optional, default `{'/':Tree.emptyTreeState}`) | |
24 | 24 … | |
25 | 25 … | ## addNodeToCheck |
26 | 26 … | |
27 | -[index.js:28-30](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/index.js#L28-L30 "Source code on GitHub") | |
27 … | +[index.js:35-37](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/index.js#L35-L37 "Source code on GitHub") | |
28 | 28 … | |
29 | 29 … | add a potaintail node in the state graph to check for garbage collection |
30 | 30 … | |
31 | 31 … | **Parameters** |
@@ -33,9 +33,9 @@ | ||
33 | 33 … | - `id` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** |
34 | 34 … | |
35 | 35 … | ## getDestPort |
36 | 36 … | |
37 | -[index.js:37-43](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/index.js#L37-L43 "Source code on GitHub") | |
37 … | +[index.js:44-51](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/index.js#L44-L51 "Source code on GitHub") | |
38 | 38 … | |
39 | 39 … | given a port, this finds the corridsponeding endpoint port of the channel |
40 | 40 … | |
41 | 41 … | **Parameters** |
@@ -45,9 +45,9 @@ | ||
45 | 45 … | Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** |
46 | 46 … | |
47 | 47 … | ## getInstance |
48 | 48 … | |
49 | -[index.js:73-83](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/index.js#L73-L83 "Source code on GitHub") | |
49 … | +[index.js:105-116](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/index.js#L105-L116 "Source code on GitHub") | |
50 | 50 … | |
51 | 51 … | gets an existsing container instances |
52 | 52 … | |
53 | 53 … | **Parameters** |
@@ -57,26 +57,27 @@ | ||
57 | 57 … | Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** |
58 | 58 … | |
59 | 59 … | ## createInstance |
60 | 60 … | |
61 | -[index.js:95-119](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/index.js#L95-L119 "Source code on GitHub") | |
61 … | +[index.js:128-165](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/index.js#L128-L165 "Source code on GitHub") | |
62 | 62 … | |
63 | 63 … | creates an new container instances and save it in the state |
64 | 64 … | |
65 | 65 … | **Parameters** |
66 | 66 … | |
67 | 67 … | - `type` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the type of container to create |
68 | -- `code` **any** | |
69 | -- `entryPorts` **[array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** (optional, default `[]`) | |
68 … | +- `message` (optional, default `new Message()`) | |
70 | 69 … | - `id` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** (optional, default `{nonce:0,parent:null}`) |
71 | 70 … | - `id.nonce` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** |
72 | 71 … | - `id.parent` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** |
72 … | +- `code` **any** | |
73 … | +- `entryPorts` **[array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** | |
73 | 74 … | |
74 | 75 … | Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** |
75 | 76 … | |
76 | 77 … | ## createStateRoot |
77 | 78 … | |
78 | -[index.js:127-134](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/index.js#L127-L134 "Source code on GitHub") | |
79 … | +[index.js:187-196](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/index.js#L187-L196 "Source code on GitHub") | |
79 | 80 … | |
80 | 81 … | creates a state root starting from a given container and a given number of |
81 | 82 … | ticks |
82 | 83 … | |
@@ -87,13 +88,13 @@ | ||
87 | 88 … | Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** |
88 | 89 … | |
89 | 90 … | ## registerContainer |
90 | 91 … | |
91 | -[index.js:142-147](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/index.js#L142-L147 "Source code on GitHub") | |
92 … | +[index.js:204-209](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/index.js#L204-L209 "Source code on GitHub") | |
92 | 93 … | |
93 | 94 … | regirsters a container with the hypervisor |
94 | 95 … | |
95 | 96 … | **Parameters** |
96 | 97 … | |
97 | -- `type` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the name of the type | |
98 | 98 … | - `Constructor` **Class** a Class for instantiating the container |
99 | 99 … | - `args` **any** any args that the contructor takes |
100 … | +- `typeId` **interger** the container's type identification ID (optional, default `Constructor.typeId`) |
docs/kernel.md | ||
---|---|---|
@@ -3,16 +3,17 @@ | ||
3 | 3 … | ### Table of Contents |
4 | 4 … | |
5 | 5 … | - [constructor](#constructor) |
6 | 6 … | - [queue](#queue) |
7 | -- [run](#run) | |
7 … | +- [message](#message) | |
8 | 8 … | - [incrementTicks](#incrementticks) |
9 | 9 … | - [createMessage](#createmessage) |
10 … | +- [createInstance](#createinstance) | |
10 | 11 … | - [send](#send) |
11 | 12 … | |
12 | 13 … | ## constructor |
13 | 14 … | |
14 | -[kernel.js:15-28](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/kernel.js#L15-L28 "Source code on GitHub") | |
15 … | +[kernel.js:16-31](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/kernel.js#L16-L31 "Source code on GitHub") | |
15 | 16 … | |
16 | 17 … | the Kernel manages the varous message passing functions and provides |
17 | 18 … | an interface for the containers to use |
18 | 19 … | |
@@ -25,33 +26,34 @@ | ||
25 | 26 … | - `opts.container` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the container constuctor and argments |
26 | 27 … | |
27 | 28 … | ## queue |
28 | 29 … | |
29 | -[kernel.js:35-48](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/kernel.js#L35-L48 "Source code on GitHub") | |
30 … | +[kernel.js:38-41](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/kernel.js#L38-L41 "Source code on GitHub") | |
30 | 31 … | |
31 | 32 … | adds a message to this containers message queue |
32 | 33 … | |
33 | 34 … | **Parameters** |
34 | 35 … | |
35 | 36 … | - `portName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** |
36 | 37 … | - `message` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** |
37 | 38 … | |
38 | -## run | |
39 … | +## message | |
39 | 40 … | |
40 | -[kernel.js:78-98](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/kernel.js#L78-L98 "Source code on GitHub") | |
41 … | +[kernel.js:89-115](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/kernel.js#L89-L115 "Source code on GitHub") | |
41 | 42 … | |
42 | 43 … | run the kernels code with a given enviroment |
43 | 44 … | |
44 | 45 … | **Parameters** |
45 | 46 … | |
46 | 47 … | - `message` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the message to run |
47 | -- `init` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** whether or not to run the intialization routine (optional, default `false`) | |
48 … | +- `method` (optional, default `'onMessage'`) | |
49 … | +- `init` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** whether or not to run the intialization routine | |
48 | 50 … | |
49 | 51 … | Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** |
50 | 52 … | |
51 | 53 … | ## incrementTicks |
52 | 54 … | |
53 | -[kernel.js:104-107](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/kernel.js#L104-L107 "Source code on GitHub") | |
55 … | +[kernel.js:132-135](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/kernel.js#L132-L135 "Source code on GitHub") | |
54 | 56 … | |
55 | 57 … | updates the number of ticks that the container has run |
56 | 58 … | |
57 | 59 … | **Parameters** |
@@ -59,20 +61,34 @@ | ||
59 | 61 … | - `count` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** the number of ticks to add |
60 | 62 … | |
61 | 63 … | ## createMessage |
62 | 64 … | |
63 | -[kernel.js:113-121](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/kernel.js#L113-L121 "Source code on GitHub") | |
65 … | +[kernel.js:141-145](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/kernel.js#L141-L145 "Source code on GitHub") | |
64 | 66 … | |
65 | 67 … | creates a new message |
66 | 68 … | |
67 | 69 … | **Parameters** |
68 | 70 … | |
69 | 71 … | - `opts` |
70 | 72 … | - `data` **any** |
71 | 73 … | |
74 … | +## createInstance | |
75 … | + | |
76 … | +[kernel.js:153-168](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/kernel.js#L153-L168 "Source code on GitHub") | |
77 … | + | |
78 … | +creates a new container. Returning a port to it. | |
79 … | + | |
80 … | +**Parameters** | |
81 … | + | |
82 … | +- `type` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** | |
83 … | +- `message` | |
84 … | +- `data` **any** the data to populate the initail state with | |
85 … | + | |
86 … | +Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** | |
87 … | + | |
72 | 88 … | ## send |
73 | 89 … | |
74 | -[kernel.js:128-145](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/kernel.js#L128-L145 "Source code on GitHub") | |
90 … | +[kernel.js:175-184](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/kernel.js#L175-L184 "Source code on GitHub") | |
75 | 91 … | |
76 | 92 … | sends a message to a given port |
77 | 93 … | |
78 | 94 … | **Parameters** |
docs/portManager.md | ||
---|---|---|
@@ -9,15 +9,14 @@ | ||
9 | 9 … | - [clearUnboundedPorts](#clearunboundedports) |
10 | 10 … | - [isBound](#isbound) |
11 | 11 … | - [queue](#queue) |
12 | 12 … | - [get](#get) |
13 | -- [create](#create) | |
14 | 13 … | - [createChannel](#createchannel) |
15 | 14 … | - [getNextMessage](#getnextmessage) |
16 | 15 … | |
17 | 16 … | ## constructor |
18 | 17 … | |
19 | -[portManager.js:33-44](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/portManager.js#L33-L44 "Source code on GitHub") | |
18 … | +[portManager.js:32-43](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/portManager.js#L32-L43 "Source code on GitHub") | |
20 | 19 … | |
21 | 20 … | The port manager manages the the ports. This inculdes creation, deletion |
22 | 21 … | fetching and waiting on ports |
23 | 22 … | |
@@ -29,9 +28,9 @@ | ||
29 | 28 … | - `opts.exoInterface` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** |
30 | 29 … | |
31 | 30 … | ## bind |
32 | 31 … | |
33 | -[portManager.js:51-73](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/portManager.js#L51-L73 "Source code on GitHub") | |
32 … | +[portManager.js:50-71](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/portManager.js#L50-L71 "Source code on GitHub") | |
34 | 33 … | |
35 | 34 … | binds a port to a name |
36 | 35 … | |
37 | 36 … | **Parameters** |
@@ -40,9 +39,9 @@ | ||
40 | 39 … | - `port` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the port to bind |
41 | 40 … | |
42 | 41 … | ## unbind |
43 | 42 … | |
44 | -[portManager.js:80-92](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/portManager.js#L80-L92 "Source code on GitHub") | |
43 … | +[portManager.js:78-90](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/portManager.js#L78-L90 "Source code on GitHub") | |
45 | 44 … | |
46 | 45 … | unbinds a port given its name |
47 | 46 … | |
48 | 47 … | **Parameters** |
@@ -52,9 +51,9 @@ | ||
52 | 51 … | Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** |
53 | 52 … | |
54 | 53 … | ## delete |
55 | 54 … | |
56 | -[portManager.js:98-102](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/portManager.js#L98-L102 "Source code on GitHub") | |
55 … | +[portManager.js:96-100](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/portManager.js#L96-L100 "Source code on GitHub") | |
57 | 56 … | |
58 | 57 … | delete an port given the name it is bound to |
59 | 58 … | |
60 | 59 … | **Parameters** |
@@ -62,15 +61,15 @@ | ||
62 | 61 … | - `name` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** |
63 | 62 … | |
64 | 63 … | ## clearUnboundedPorts |
65 | 64 … | |
66 | -[portManager.js:112-120](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/portManager.js#L112-L120 "Source code on GitHub") | |
65 … | +[portManager.js:110-117](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/portManager.js#L110-L117 "Source code on GitHub") | |
67 | 66 … | |
68 | 67 … | clears any unbounded ports referances |
69 | 68 … | |
70 | 69 … | ## isBound |
71 | 70 … | |
72 | -[portManager.js:127-129](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/portManager.js#L127-L129 "Source code on GitHub") | |
71 … | +[portManager.js:124-126](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/portManager.js#L124-L126 "Source code on GitHub") | |
73 | 72 … | |
74 | 73 … | check if a port object is still valid |
75 | 74 … | |
76 | 75 … | **Parameters** |
@@ -80,9 +79,9 @@ | ||
80 | 79 … | Returns **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** |
81 | 80 … | |
82 | 81 … | ## queue |
83 | 82 … | |
84 | -[portManager.js:135-157](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/portManager.js#L135-L157 "Source code on GitHub") | |
83 … | +[portManager.js:132-154](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/portManager.js#L132-L154 "Source code on GitHub") | |
85 | 84 … | |
86 | 85 … | queues a message on a port |
87 | 86 … | |
88 | 87 … | **Parameters** |
@@ -91,9 +90,9 @@ | ||
91 | 90 … | - `message` **Message** |
92 | 91 … | |
93 | 92 … | ## get |
94 | 93 … | |
95 | -[portManager.js:164-166](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/portManager.js#L164-L166 "Source code on GitHub") | |
94 … | +[portManager.js:161-163](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/portManager.js#L161-L163 "Source code on GitHub") | |
96 | 95 … | |
97 | 96 … | gets a port given it's name |
98 | 97 … | |
99 | 98 … | **Parameters** |
@@ -101,32 +100,19 @@ | ||
101 | 100 … | - `name` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** |
102 | 101 … | |
103 | 102 … | Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** |
104 | 103 … | |
105 | -## create | |
106 | - | |
107 | -[portManager.js:174-193](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/portManager.js#L174-L193 "Source code on GitHub") | |
108 | - | |
109 | -creates a new container. Returning a port to it. | |
110 | - | |
111 | -**Parameters** | |
112 | - | |
113 | -- `type` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** | |
114 | -- `data` **any** the data to populate the initail state with | |
115 | - | |
116 | -Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** | |
117 | - | |
118 | 104 … | ## createChannel |
119 | 105 … | |
120 | -[portManager.js:199-213](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/portManager.js#L199-L213 "Source code on GitHub") | |
106 … | +[portManager.js:169-174](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/portManager.js#L169-L174 "Source code on GitHub") | |
121 | 107 … | |
122 | 108 … | creates a channel returns the created ports in an Array |
123 | 109 … | |
124 | 110 … | Returns **[array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** |
125 | 111 … | |
126 | 112 … | ## getNextMessage |
127 | 113 … | |
128 | -[portManager.js:229-257](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/portManager.js#L229-L257 "Source code on GitHub") | |
114 … | +[portManager.js:190-219](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/portManager.js#L190-L219 "Source code on GitHub") | |
129 | 115 … | |
130 | 116 … | Waits for the the next message if any |
131 | 117 … | |
132 | 118 … | Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** |
docs/scheduler.md | ||
---|---|---|
@@ -7,20 +7,20 @@ | ||
7 | 7 … | - [update](#update) |
8 | 8 … | - [getInstance](#getinstance) |
9 | 9 … | - [done](#done) |
10 | 10 … | - [wait](#wait) |
11 | -- [oldest](#oldest) | |
11 … | +- [leastNumberOfTicks](#leastnumberofticks) | |
12 | 12 … | |
13 | 13 … | ## constructor |
14 | 14 … | |
15 | -[scheduler.js:8-13](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/scheduler.js#L8-L13 "Source code on GitHub") | |
15 … | +[scheduler.js:8-13](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/scheduler.js#L8-L13 "Source code on GitHub") | |
16 | 16 … | |
17 | 17 … | The Sceduler manages the run cycle of the containes and figures out which |
18 | 18 … | order they should run in |
19 | 19 … | |
20 | 20 … | ## getLock |
21 | 21 … | |
22 | -[scheduler.js:20-30](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/scheduler.js#L20-L30 "Source code on GitHub") | |
22 … | +[scheduler.js:20-30](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/scheduler.js#L20-L30 "Source code on GitHub") | |
23 | 23 … | |
24 | 24 … | locks the scheduler from clearing waits untill the lock is resolved |
25 | 25 … | |
26 | 26 … | **Parameters** |
@@ -30,9 +30,9 @@ | ||
30 | 30 … | Returns **[function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** the resolve function to call once it to unlock |
31 | 31 … | |
32 | 32 … | ## update |
33 | 33 … | |
34 | -[scheduler.js:36-39](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/scheduler.js#L36-L39 "Source code on GitHub") | |
34 … | +[scheduler.js:36-40](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/scheduler.js#L36-L40 "Source code on GitHub") | |
35 | 35 … | |
36 | 36 … | updates an instance with a new tick count |
37 | 37 … | |
38 | 38 … | **Parameters** |
@@ -40,9 +40,9 @@ | ||
40 | 40 … | - `instance` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** a container instance |
41 | 41 … | |
42 | 42 … | ## getInstance |
43 | 43 … | |
44 | -[scheduler.js:59-61](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/scheduler.js#L59-L61 "Source code on GitHub") | |
44 … | +[scheduler.js:59-61](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/scheduler.js#L59-L61 "Source code on GitHub") | |
45 | 45 … | |
46 | 46 … | returns a container |
47 | 47 … | |
48 | 48 … | **Parameters** |
@@ -52,9 +52,9 @@ | ||
52 | 52 … | Returns **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** |
53 | 53 … | |
54 | 54 … | ## done |
55 | 55 … | |
56 | -[scheduler.js:67-71](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/scheduler.js#L67-L71 "Source code on GitHub") | |
56 … | +[scheduler.js:67-71](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/scheduler.js#L67-L71 "Source code on GitHub") | |
57 | 57 … | |
58 | 58 … | deletes an instance from the scheduler |
59 | 59 … | |
60 | 60 … | **Parameters** |
@@ -62,9 +62,9 @@ | ||
62 | 62 … | - `id` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the containers id |
63 | 63 … | |
64 | 64 … | ## wait |
65 | 65 … | |
66 | -[scheduler.js:80-93](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/scheduler.js#L80-L93 "Source code on GitHub") | |
66 … | +[scheduler.js:80-94](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/scheduler.js#L80-L94 "Source code on GitHub") | |
67 | 67 … | |
68 | 68 … | returns a promise that resolves once all containers have reached the given |
69 | 69 … | number of ticks |
70 | 70 … | |
@@ -74,11 +74,11 @@ | ||
74 | 74 … | - `id` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** optional id of the container that is waiting |
75 | 75 … | |
76 | 76 … | Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** |
77 | 77 … | |
78 | -## oldest | |
78 … | +## leastNumberOfTicks | |
79 | 79 … | |
80 | -[scheduler.js:99-102](https://github.com/primea/js-primea-hypervisor/blob/317d79e49cb56dd81cb9c94072cd24ad6a825757/scheduler.js#L99-L102 "Source code on GitHub") | |
80 … | +[scheduler.js:100-103](https://github.com/primea/js-primea-hypervisor/blob/add087e94722a8b77695d21eca754a562d7e79f5/scheduler.js#L100-L103 "Source code on GitHub") | |
81 | 81 … | |
82 | 82 … | returns the oldest container's ticks |
83 | 83 … | |
84 | 84 … | Returns **integer** |
Built with git-ssb-web