Skip to content

Commit

Permalink
rebuild docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wanderer committed Nov 30, 2017
1 parent 46c1122 commit e16ebf5
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 87 deletions.
20 changes: 10 additions & 10 deletions docs/actor.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

## constructor

[actor.js:15-31](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/actor.js#L15-L31 "Source code on GitHub")
[actor.js:16-33](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/actor.js#L16-L33 "Source code on GitHub")

the Actor manages the varous message passing functions and provides
an interface for the containers to use
Expand All @@ -30,7 +30,7 @@ an interface for the containers to use

## mintCap

[actor.js:38-43](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/actor.js#L38-L43 "Source code on GitHub")
[actor.js:40-45](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/actor.js#L40-L45 "Source code on GitHub")

Mints a new capabilitly with a given tag

Expand All @@ -42,7 +42,7 @@ Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refer

## queue

[actor.js:50-53](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/actor.js#L50-L53 "Source code on GitHub")
[actor.js:52-55](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/actor.js#L52-L55 "Source code on GitHub")

adds a message to this actor's message queue

Expand All @@ -53,7 +53,7 @@ adds a message to this actor's message queue

## create

[actor.js:60-66](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/actor.js#L60-L66 "Source code on GitHub")
[actor.js:62-68](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/actor.js#L62-L68 "Source code on GitHub")

runs the creation routine for the actor

Expand All @@ -65,19 +65,19 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe

## shutdown

[actor.js:95-97](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/actor.js#L95-L97 "Source code on GitHub")
[actor.js:97-99](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/actor.js#L97-L99 "Source code on GitHub")

Runs the shutdown routine for the actor

## startup

[actor.js:102-104](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/actor.js#L102-L104 "Source code on GitHub")
[actor.js:104-106](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/actor.js#L104-L106 "Source code on GitHub")

Runs the startup routine for the actor

## runMessage

[actor.js:112-132](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/actor.js#L112-L132 "Source code on GitHub")
[actor.js:114-134](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/actor.js#L114-L134 "Source code on GitHub")

run the Actor with a given message

Expand All @@ -90,7 +90,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe

## incrementTicks

[actor.js:138-141](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/actor.js#L138-L141 "Source code on GitHub")
[actor.js:140-143](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/actor.js#L140-L143 "Source code on GitHub")

updates the number of ticks that the actor has run

Expand All @@ -100,7 +100,7 @@ updates the number of ticks that the actor has run

## createActor

[actor.js:148-151](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/actor.js#L148-L151 "Source code on GitHub")
[actor.js:150-153](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/actor.js#L150-L153 "Source code on GitHub")

creates an actor

Expand All @@ -111,7 +111,7 @@ creates an actor

## send

[actor.js:168-174](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/actor.js#L168-L174 "Source code on GitHub")
[actor.js:170-177](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/actor.js#L170-L177 "Source code on GitHub")

sends a message to a given port

Expand Down
57 changes: 0 additions & 57 deletions docs/capsManager.md

This file was deleted.

51 changes: 51 additions & 0 deletions docs/capsStore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### Table of Contents

- [constructor](#constructor)
- [store](#store)
- [load](#load)
- [delete](#delete)

## constructor

[capsStore.js:6-8](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/capsStore.js#L6-L8 "Source code on GitHub")

The caps store, persistantly stores an actors capabilites.

**Parameters**

- `storedCaps` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**

## store

[capsStore.js:15-18](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/capsStore.js#L15-L18 "Source code on GitHub")

Stores a cap at a given key

**Parameters**

- `key` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**
- `cap` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**

## load

[capsStore.js:25-28](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/capsStore.js#L25-L28 "Source code on GitHub")

gets a cap given its key

**Parameters**

- `key` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**

Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**

## delete

[capsStore.js:34-36](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/capsStore.js#L34-L36 "Source code on GitHub")

delete cap given its key

**Parameters**

- `key` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**
14 changes: 7 additions & 7 deletions docs/hypervisor.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

## constructor

[index.js:10-15](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/index.js#L10-L15 "Source code on GitHub")
[index.js:10-15](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/index.js#L10-L15 "Source code on GitHub")

The Hypervisor manages the container instances by instantiating them and
destorying them when possible. It also facilitates localating Containers
Expand All @@ -22,7 +22,7 @@ destorying them when possible. It also facilitates localating Containers

## send

[index.js:23-27](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/index.js#L23-L27 "Source code on GitHub")
[index.js:23-27](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/index.js#L23-L27 "Source code on GitHub")

sends a message

Expand All @@ -35,7 +35,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe

## getActor

[index.js:52-63](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/index.js#L52-L63 "Source code on GitHub")
[index.js:52-63](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/index.js#L52-L63 "Source code on GitHub")

gets an existsing actor

Expand All @@ -47,19 +47,19 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe

## createActor

[index.js:71-95](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/index.js#L71-L95 "Source code on GitHub")
[index.js:71-94](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/index.js#L71-L94 "Source code on GitHub")

creates an instance of an Actor

**Parameters**

- `type` **Integer** the type id for the container
- `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
- `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}`)
- `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}`)

## createStateRoot

[index.js:108-111](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/index.js#L108-L111 "Source code on GitHub")
[index.js:107-110](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/index.js#L107-L110 "Source code on GitHub")

creates a state root starting from a given container and a given number of
ticks
Expand All @@ -72,7 +72,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe

## registerContainer

[index.js:119-124](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/index.js#L119-L124 "Source code on GitHub")
[index.js:118-123](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/index.js#L118-L123 "Source code on GitHub")

regirsters a container with the hypervisor

Expand Down
8 changes: 4 additions & 4 deletions docs/inbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

## constructor

[inbox.js:23-31](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/inbox.js#L23-L31 "Source code on GitHub")
[inbox.js:23-31](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/inbox.js#L23-L31 "Source code on GitHub")

The inbox manages and sorts incoming messages and provides functions
to wait on messages
Expand All @@ -22,7 +22,7 @@ to wait on messages

## queue

[inbox.js:37-47](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/inbox.js#L37-L47 "Source code on GitHub")
[inbox.js:37-47](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/inbox.js#L37-L47 "Source code on GitHub")

queues a message

Expand All @@ -32,7 +32,7 @@ queues a message

## nextTaggedMessage

[inbox.js:55-66](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/inbox.js#L55-L66 "Source code on GitHub")
[inbox.js:55-66](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/inbox.js#L55-L66 "Source code on GitHub")

Waits for a message sent with a capablitly that has one of the given tags

Expand All @@ -45,7 +45,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe

## nextMessage

[inbox.js:73-109](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/inbox.js#L73-L109 "Source code on GitHub")
[inbox.js:73-110](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/inbox.js#L73-L110 "Source code on GitHub")

Waits for the the next message if any

Expand Down
14 changes: 7 additions & 7 deletions docs/scheduler.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@

## constructor

[scheduler.js:14-20](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/scheduler.js#L14-L20 "Source code on GitHub")
[scheduler.js:14-20](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/scheduler.js#L14-L20 "Source code on GitHub")

The Scheduler manages the actor instances and tracks how many "ticks" they
have ran.

## lock

[scheduler.js:27-29](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/scheduler.js#L27-L29 "Source code on GitHub")
[scheduler.js:27-29](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/scheduler.js#L27-L29 "Source code on GitHub")

locks the scheduler from clearing waits untill the lock is resolved

Expand All @@ -31,7 +31,7 @@ Returns **[function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Ref

## update

[scheduler.js:35-40](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/scheduler.js#L35-L40 "Source code on GitHub")
[scheduler.js:35-40](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/scheduler.js#L35-L40 "Source code on GitHub")

updates an instance with a new tick count

Expand All @@ -41,7 +41,7 @@ updates an instance with a new tick count

## getInstance

[scheduler.js:52-54](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/scheduler.js#L52-L54 "Source code on GitHub")
[scheduler.js:52-54](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/scheduler.js#L52-L54 "Source code on GitHub")

returns an Actor instance

Expand All @@ -53,7 +53,7 @@ Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refer

## done

[scheduler.js:60-64](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/scheduler.js#L60-L64 "Source code on GitHub")
[scheduler.js:60-64](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/scheduler.js#L60-L64 "Source code on GitHub")

deletes an instance from the scheduler

Expand All @@ -63,7 +63,7 @@ deletes an instance from the scheduler

## wait

[scheduler.js:73-84](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/scheduler.js#L73-L84 "Source code on GitHub")
[scheduler.js:73-84](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/scheduler.js#L73-L84 "Source code on GitHub")

returns a promise that resolves once all containers have reached the given
number of ticks
Expand All @@ -77,7 +77,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe

## leastNumberOfTicks

[scheduler.js:90-100](https://github.com/primea/js-primea-hypervisor/blob/4d548116a6a4d4ceeda766ea686a328148cb029b/scheduler.js#L90-L100 "Source code on GitHub")
[scheduler.js:90-100](https://github.com/primea/js-primea-hypervisor/blob/46c11229b2dac84739660d8242a0eaa65697f8bc/scheduler.js#L90-L100 "Source code on GitHub")

returns the oldest container's ticks

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"coveralls": "npm run coverage && nyc report --reporter=text-lcov | coveralls",
"coverage": "nyc npm test",
"lint": "standard",
"build:docs": "npm run build:docs:hypervisor && npm run build:docs:actor && npm run build:docs:scheduler && npm run build:docs:capsManager && npm run build:docs:inbox",
"build:docs": "npm run build:docs:hypervisor && npm run build:docs:actor && npm run build:docs:scheduler && npm run build:docs:capsStore && npm run build:docs:inbox",
"build:docs:hypervisor": "documentation build ./index.js --github --shallow --sort-order source -f md > ./docs/hypervisor.md",
"build:docs:actor": "documentation build ./actor.js --github --shallow --sort-order source -f md > ./docs/actor.md",
"build:docs:capsManager": "documentation build ./capsManager.js --github --shallow --sort-order source -f md > ./docs/capsManager.md",
"build:docs:capsStore": "documentation build ./capsStore.js --github --shallow --sort-order source -f md > ./docs/capsStore.md",
"build:docs:scheduler": "documentation build ./scheduler.js --github --shallow --sort-order source -f md > ./docs/scheduler.md",
"build:docs:inbox": "documentation build ./inbox.js --github --shallow --sort-order source -f md > ./docs/inbox.md",
"test": "node ./tests/index.js"
Expand Down

0 comments on commit e16ebf5

Please sign in to comment.