mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 07:24:53 +09:00
Rewrite statistics export
Add automatic export of metrics from slaves to the master server. And rewrite the statistics export plugin to use this new system.
This commit is contained in:
1 parent
8229d1955c
commit
26eefb0476
19 files changed
+334
-226
No files matched your search
@@ -57,10 +57,12 @@ class MockConnector extends events.EventEmitter {
|
||||
class MockServer {
|
||||
constructor() {
|
||||
this.rconCommands = [];
|
||||
this.rconCommandResults = new Map();
|
||||
}
|
||||
|
||||
async sendRcon(command) {
|
||||
this.rconCommands.push(command);
|
||||
return this.rconCommandResults.get(command) || '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +71,9 @@ class MockInstance extends link.Link {
|
||||
super('instance', 'slave', new MockConnector());
|
||||
this.server = new MockServer();
|
||||
this.name = "test";
|
||||
this.config = {
|
||||
id: 7357,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user