Implement host plugins

Add ability to define plugin code that runs in the context of a host,
starts up with the host does, and stops when the host shuts down.
This commit is contained in:
Hornwitser committed 2023-11-25 19:18:33 +01:00
1 parent 808eda0513
commit ee9c200ebf
8 files changed
+247 -30

No files matched your search

+2 -2
View File
@@ -136,8 +136,8 @@ module.exports = {
}
```
For the instance plugin it's exactly the same except "Controller" is replaced with "Instance", and for the clusterioctl plugin "Ctl" is used.
The available hooks that you can override are documented in the base class [in lib/plugin.js](/packages/lib/plugin.js).
For the instance plugin it's exactly the same except "Controller" is replaced with "Instance", for host plugins "Host" is used and for the clusterioctl plugin "Ctl" is used.
The available hooks that you can override are documented in the base classes.
It's best to avoid defining a constructor, but if you insist on defining one, forward all arguments to the base class.
E.g.: