Skip to content

Instantly share code, notes, and snippets.

@lightsofapollo
Last active December 20, 2015 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lightsofapollo/6042626 to your computer and use it in GitHub Desktop.
Save lightsofapollo/6042626 to your computer and use it in GitHub Desktop.
/**
* Interface for creating a host.
*
* @param {Object} [options] optional options for host.
*/
function Host(options) {
this.metadata = {
host: 'firefox',
wifi: false,
otherStuffAboutThisHost: true
}
}
var Host.prototype = {
/**
* @type Object where metadata is stored.
* /
metadata: null,
/**
* Hard (from initial state) start of host.
*
* @param {Function} callback to signal completion [Error err, Number port].
*/
start: function(callback) {
},
/**
* Restart the host process. Typically this indicates a "soft" restart
* if available which would be faster then start/stop.
*
* @param {Function} callback to signal completion [Error, Number port].
*/
restart: function() {
},
/**
* Stop the host from running.
*
* @param {Function} callback to signal completion [Error].
*/
stop: function() {
}
};
module.exports = Host;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment