Skip to content

Commit

Permalink
gh-pages: update ghpages
Browse files Browse the repository at this point in the history
  • Loading branch information
esatterwhite committed Mar 11, 2018
1 parent 1b91ee6 commit d49e938
Show file tree
Hide file tree
Showing 46 changed files with 97 additions and 203 deletions.
4 changes: 2 additions & 2 deletions docs/api/api_project.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
define({
"name": "skyring",
"version": "6.0.0-alpha.1",
"version": "6.0.0",
"description": "Distributed timers as a service",
"sampleUrl": false,
"defaultVersion": "0.0.0",
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
"time": "2018-02-22T04:33:17.651Z",
"time": "2018-03-11T18:53:52.639Z",
"url": "http://apidocjs.com",
"version": "0.17.6"
}
Expand Down
4 changes: 2 additions & 2 deletions docs/api/api_project.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "skyring",
"version": "6.0.0-alpha.1",
"version": "6.0.0",
"description": "Distributed timers as a service",
"sampleUrl": false,
"defaultVersion": "0.0.0",
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
"time": "2018-02-22T04:33:17.651Z",
"time": "2018-03-11T18:53:52.639Z",
"url": "http://apidocjs.com",
"version": "0.17.6"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/classes.list.html
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
10 changes: 8 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,13 @@ <h2>Create a timer</h2><h5><strong>POST <code>/timer</code></strong></h5><p><str
immediately load them back into memory. By default, the <a href="https://www.npmjs.com/package/memdown">memdown</a> backend is used, and wil not
persists between starts. To enable full persistence and recovery, you must configure skyring to use a
persistent backend for <code>levelup</code>. <a href="https://www.npmjs.com/package/leveldown">Leveldown</a> is installed by default.</p>
<pre class="prettyprint source lang-bash"><code>skyring run --storage:backend=leveldown --storage:path='/var/data/skyring'</code></pre><h1>Custom Transports</h1><p>Skyring ships with a single HTTP transport, but support custom transports. A <code>transport</code> is a named function
<pre class="prettyprint source lang-bash"><code>skyring run --storage:backend=leveldown --storage:path='/var/data/skyring'</code></pre><h3>Custom Storage</h3><p>In situations when the local disk is not reliable enough, you can install and use any levelup backend to suite your needs.
If, for example you want to off load data storage to a <a href="https://github.com/esatterwhite/skyring/tree/master/examples/mongo-storage">mongo</a>
or <a href="https://github.com/esatterwhite/skyring/tree/master/examples/scylla-storage">scylladb</a> cluster, you would just include the backend package
as a dependency in your project and specify it by name as the stoargae package. Options for the backend can be passed via the <code>storage</code> attribute</p>
<pre class="prettyprint source lang-bash"><code>npm install @skyring/scylladown
skyring run --storage:backend=@skyring/scylladown --storage:path=skyring-1 --storage:contactPoints=0.0.0.0:9042 --storage:contactPoints=0.0.0.0:9043
skyring run --storage:backend=@skyring/scylladown --storage:path=skyring-2 --storage:contactPoints=0.0.0.0:9042 --storage:contactPoints=0.0.0.0:9043</code></pre><h1>Custom Transports</h1><p>Skyring ships with a single HTTP transport, but support custom transports. A <code>transport</code> is a named function
that can be executed when a timer triggers. To register a transport, you can pass an array of named functions, or
requireable paths to the skyring server constructor via via the <a href="module-skyring_lib_transports.html">transports</a> option</p>
<p>Optionally, for transports that need to perform some clean up work, a function property <code>shutdown</code> may be defined
Expand Down Expand Up @@ -265,7 +271,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
4 changes: 2 additions & 2 deletions docs/index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ <h1 class="page-title">Source: index.js</h1>

const server = new Server();

server.load().listen(conf.get('PORT'), (err) => {
server.listen(conf.get('PORT'), (err) => {
if(err) {
process.exitCode = 1;
console.error(err);
Expand Down Expand Up @@ -202,7 +202,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_json.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_nats.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
82 changes: 39 additions & 43 deletions docs/lib_server_index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ <h1 class="page-title">Source: lib/server/index.js</h1>
*/

const http = require('http')
, util = require('util')
, Debug = require('debug')
, mock = require('./mock')
, routes = require('./api')
, Node = require('./node')
, Router = require('./router')
, Timer = require('../timer')
Expand Down Expand Up @@ -176,43 +178,13 @@ <h1 class="page-title">Source: lib/server/index.js</h1>
this._node = new Node();
}
this._group = this._node.name;
this._timers = new Timer({
nats: this.options.nats
, storage: this.options.storage
, transports: this.options.transports
});
this._router = new Router(this._node, this._timers);
this._node.on('ringchange', (evt) => {
this._timers.rebalance(evt, this._node, (data) => {
this.proxy(data);
});
});
this._node.on('bootstrap', (seeds) => {
this.emit('bootstrap', seeds);
});
}

/**
* loads application routes if not already loaded
* @method module:skyring/lib/server#load
* @return {module:skyring/lib/server}
**/
load() {
if( this.loaded ) return this;
const routes = require('./api');
Object.keys(routes)
.forEach((name) => {
const item = routes[name];
const route = this._router.route(
item.path
, item.method
, item.handler
);

item.middleware &amp;&amp; route.before( item.middleware );
});

return this;
this.load = util.deprecate(() => {
return this
}, 'server#load is deprecated and will be removed in future version')
}

/**
Expand All @@ -227,18 +199,42 @@ <h1 class="page-title">Source: lib/server/index.js</h1>
listen(port, ...args) {
const callback = args[args.length - 1]
debug('seed nodes', this.options.seeds);
this._node.join(this.options.seeds, (err) => {
if (err) {
console.error(err);
return typeof callback === 'function' ? callback(err) : null;

this._timers = new Timer({
nats: this.options.nats
, storage: this.options.storage
, transports: this.options.transports
}, (err) => {
if (err) return typeof callback === 'function' ? callback(err) : null;
this._router = new Router(this._node, this._timers);
for (const key of Object.keys(routes)) {
const item = routes[key]
const route = this._router.route(
item.path
, item.method
, item.handler
);

item.middleware &amp;&amp; route.before( item.middleware );
}
this._node.handle(( req, res ) => {
this._router.handle( req, res );
this._node.on('ringchange', (evt) => {
this._timers.rebalance(evt, this._node, (data) => {
this.proxy(data);
});
});
this._timers.watch(`skyring:${this._group}`, (err, data) => {
this.proxy(data);
this._node.join(this.options.seeds, (err) => {
if (err) {
console.error(err);
return typeof callback === 'function' ? callback(err) : null;
}
this._node.handle(( req, res ) => {
this._router.handle( req, res );
});
this._timers.watch(`skyring:${this._group}`, (err, data) => {
this.proxy(data);
});
super.listen(port, ...args);
});
super.listen(port, ...args);
});
return this;
}
Expand Down Expand Up @@ -337,7 +333,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_server_mock.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_server_node.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_server_request.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_server_response.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_server_route.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_server_router.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
9 changes: 4 additions & 5 deletions docs/lib_timer.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,7 @@ <h1 class="page-title">Source: lib/timer.js</h1>
this[kNode] = generateId(store_opts.path)
this.nats = nats.createClient( this.options.nats );
this.transports = new Transports(this.options.transports);
this[storage] = levelup(backend, opts)

this[storage].once('ready', () => {
this[storage] = levelup(backend, opts, (err) => {
store('storage backend ready', store_opts);
debug('node id', this[kNode])
this.recover(() => {
Expand All @@ -209,7 +207,8 @@ <h1 class="page-title">Source: lib/timer.js</h1>
, type: EVENT_STATUS.READY
}), cb)
});
});
})

}

/**
Expand Down Expand Up @@ -644,7 +643,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_transports_callback.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_transports_http.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/lib_transports_index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/module-keef.html
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/module-skyring.html
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/module-skyring_conf.html
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/module-skyring_lib_json.html
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/module-skyring_lib_nats.html
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>

on 2018-02-21T23:33:17-05:00
on 2018-03-11T13:53:52-05:00

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
Loading

0 comments on commit d49e938

Please sign in to comment.