mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-15 07:24:52 +09:00
Notify master about instance status update
Send updates to the master server when the running status of instances change and add onInstanceStatusChanged hook to master plugins.
This commit is contained in:
1 parent
a8e29fdc56
commit
3211fbe985
5 files changed
+111
-16
No files matched your search
@@ -163,6 +163,21 @@ class BaseMasterPlugin {
|
||||
*/
|
||||
async init() { }
|
||||
|
||||
/**
|
||||
* Called when the status of an instance changes
|
||||
*
|
||||
* Invoked when the master server has received notice from a slave that
|
||||
* the running status of an instance has changed. The possible statuses
|
||||
* are `stopped` meaning it is not loaded or running, `initialized`
|
||||
* meaning the instance has initialized and is starting up the Factorio
|
||||
* server, and `running` which means the Factorio server it manages is
|
||||
* up and running.
|
||||
*
|
||||
* @param {Object} instance - the instance that changed.
|
||||
* @param {string} prev - the previous status of the instance.
|
||||
*/
|
||||
async onInstanceStatusChanged(instance, prev) { }
|
||||
|
||||
/**
|
||||
* Called before collecting Prometheus metrics
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user