mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 07:24:52 +09:00
* .js to .ts * translate * update paths to dist/plugin * add "tsc --build" to prepare * use field main in package.json de find info * tsc --build need to append before webpack * update test and use for plugins package.main
25 lines
797 B
JavaScript
25 lines
797 B
JavaScript
"use strict";
|
|
const lib = require("@clusterio/lib");
|
|
|
|
class InstanceConfigGroup extends lib.PluginConfigGroup {}
|
|
InstanceConfigGroup.defaultAccess = ["controller", "host", "control"];
|
|
InstanceConfigGroup.groupName = "statistics_exporter";
|
|
InstanceConfigGroup.define({
|
|
name: "command_timeout",
|
|
title: "Command Timeout",
|
|
description: "Timeout in seconds of the metrics command before returning results from the previous invocation.",
|
|
type: "number",
|
|
initial_value: 1,
|
|
});
|
|
InstanceConfigGroup.finalize();
|
|
|
|
module.exports.default = {
|
|
name: "statistics_exporter",
|
|
title: "Statistics Exporter",
|
|
description:
|
|
"Provides in-game item/fluid production, builds, kills, and pollution "+
|
|
"statistics to the cluster's Prometheus endpoint.",
|
|
instanceEntrypoint: "instance",
|
|
InstanceConfigGroup,
|
|
};
|