Add selectable PostgreSQL monitor backends
This commit is contained in:
@@ -84,6 +84,20 @@ class Plugin:
|
||||
+ ", ".join(missing)
|
||||
)
|
||||
|
||||
plugin_validator = getattr(
|
||||
self.module,
|
||||
"validate_config",
|
||||
None,
|
||||
)
|
||||
|
||||
if plugin_validator is not None:
|
||||
try:
|
||||
plugin_validator(config)
|
||||
except (TypeError, ValueError) as exc:
|
||||
raise RegistryError(
|
||||
f"invalid plugin configuration: {exc}"
|
||||
) from exc
|
||||
|
||||
def execute(
|
||||
self,
|
||||
action,
|
||||
|
||||
Reference in New Issue
Block a user