mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 15:24:52 +09:00
Implement config notification event
Add fieldChanged event to config objects that is triggered when the value of a field in a group belonging to it is changed.
This commit is contained in:
1 parent
fc3686b865
commit
67ca8dcc4d
4 files changed
+101
-21
No files matched your search
@@ -42,6 +42,19 @@ class BaseInstancePlugin {
|
||||
*/
|
||||
async init() { }
|
||||
|
||||
/**
|
||||
* Called when the value of a config field changed.
|
||||
*
|
||||
* Invoked after the value of the config field given by `field` has
|
||||
* changed.
|
||||
*
|
||||
* @param {module:lib/config.ConfigGroup} group -
|
||||
* The group who's field got changed on.
|
||||
* @param {string} field - Name of the field that changed.
|
||||
* @param prev - The previous value of the field.
|
||||
*/
|
||||
async onInstanceConfigFieldChanged(group, field, prev) { }
|
||||
|
||||
/**
|
||||
* Called before collecting Prometheus metrics
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user