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:
Hornwitser committed 2019-12-20 21:26:29 +01:00
1 parent 8229d1955c
commit 26eefb0476
19 files changed
+334 -226

No files matched your search

+5
View File
@@ -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,
}
}
}