mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 07:33:12 +09:00
Fix documentation
Fix missing module declarations, broken lings, broken formating and incorrect scopes in the documentation. For modules split over several files it appears the only viable option is to use the memberof directive on each documented member and only declare the index file as a module.
This commit is contained in:
1 parent
7a9b6592e6
commit
b151dd8469
22 files changed
+318
-56
No files matched your search
+18
-2
@@ -11,6 +11,7 @@ const errors = require("lib/errors");
|
||||
|
||||
/**
|
||||
* Base class for instance plugins
|
||||
* @static
|
||||
*/
|
||||
class BaseInstancePlugin {
|
||||
constructor(info, instance, slave) {
|
||||
@@ -21,7 +22,7 @@ class BaseInstancePlugin {
|
||||
|
||||
/**
|
||||
* Instance the plugin started for
|
||||
* @type {Instance}
|
||||
* @type {module:slave~Instance}
|
||||
*/
|
||||
this.instance = instance;
|
||||
|
||||
@@ -31,7 +32,7 @@ class BaseInstancePlugin {
|
||||
* With the exepction of accessing the slave's config you should
|
||||
* avoid ineracting with the slave object directly.
|
||||
*
|
||||
* @type {Slave}
|
||||
* @type {module:slave~Slave}
|
||||
*/
|
||||
this.slave = slave;
|
||||
}
|
||||
@@ -95,6 +96,10 @@ class BaseInstancePlugin {
|
||||
async onOutput(output) { }
|
||||
}
|
||||
|
||||
/**
|
||||
* Base class for master plugins
|
||||
* @static
|
||||
*/
|
||||
class BaseMasterPlugin {
|
||||
constructor(info, master, metrics) {
|
||||
this.info = info;
|
||||
@@ -138,6 +143,7 @@ class BaseMasterPlugin {
|
||||
* function be called again.
|
||||
*
|
||||
* @returns {Map<string, Object>} mapping of plugin name to info module.
|
||||
* @static
|
||||
*/
|
||||
async function loadPluginInfos(baseDir) {
|
||||
let plugins = [];
|
||||
@@ -167,6 +173,16 @@ async function loadPluginInfos(baseDir) {
|
||||
return plugins;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attach plugin messages
|
||||
*
|
||||
* Attaches all messages defined in the `.message` property of the
|
||||
* `pluginInfo` passed with handlers taken from `pluin`.
|
||||
*
|
||||
* @param {module:lib/link.Link} link - Link to attach handlers to.
|
||||
* @param {object} pluginInfo - Plugin info object.
|
||||
* @param plugin - The instance of the plugin to use handlers from.
|
||||
*/
|
||||
function attachPluginMessages(link, pluginInfo, plugin) {
|
||||
let messageDefinitions = pluginInfo.messages || [];
|
||||
for (let [name, messageFormat] of Object.entries(messageDefinitions)) {
|
||||
|
||||
Reference in new issue
Block a user