Add instance config event for master plugins

Add onInstanceConfigFieldChanged hook for master plugin code which
triggers when instance configs are changed on the master server.
This commit is contained in:
Hornwitser committed 2021-05-12 20:42:52 +02:00
1 parent 8b857224dc
commit 322570f298
4 files changed
+28 -1

No files matched your search

+14
View File
@@ -286,6 +286,20 @@ class BaseMasterPlugin {
*/
async onInstanceStatusChanged(instance, prev) { }
/**
* Called when the value of an instance config field changed.
*
* Invoked after the value of the config field given by `field` has
* changed on an instance.
*
* @param {Object} instance - The instance the config changed on.
* @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(instance, group, field, prev) { }
/**
* Called before collecting Prometheus metrics
*