mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 07:04:52 +09:00
Move all functions and classes currently available through lib/name and libName to be under a single flat namespace in lib. This make reorganising the lib namespace much simpler as the location of symbols can move without breaking the consumers of lib. The multi-entrypoint design was already problematic for the web plugin system which couldn't effectively use it due to how webpack's shared module system is awkward to set up with multiple entrypoints per package.
25 lines
789 B
JavaScript
25 lines
789 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 = {
|
|
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,
|
|
};
|