new notifications: plugin_stopped and plugin_started

[Added version tag into documentation, to show it was added in 25.02 --RR]
Changelog-Added: Plugins: new nofitications `plugin_stopped` and `plugin_started`
This commit is contained in:
gudnuf
2024-07-30 15:33:07 -07:00
committed by Rusty Russell
parent c3362b057c
commit 61482e5f45
4 changed files with 96 additions and 0 deletions

View File

@@ -519,3 +519,51 @@ In the shutdown case, plugins should not interact with lightnind except via (id-
}
}
```
### `plugin_started` (v25.02 onward)
Emitted when a plugin has completed startup.
```json
{
"plugin_started": {
"plugin_name": "example_plugin",
"plugin_path": "/path/to/example_plugin.py",
"methods": [
"example_method1",
"example_method2",
"example_method3"
]
}
}
```
Where:
- `plugin_name`: The short name of the plugin.
- `plugin_path`: The full file path to the plugin executable.
- `methods`: An array of RPC method names that the plugin registered.
### `plugin_stopped` (v25.02 onward)
Emitted when a plugin has been stopped or has exited.
```json
{
"plugin_stopped": {
"plugin_name": "example_plugin",
"plugin_path": "/path/to/example_plugin.py",
"methods": [
"example_method1",
"example_method2",
"example_method3"
]
}
}
```
Where:
- `plugin_name`: The short name of the plugin.
- `plugin_path`: The full file path to the plugin executable.
- `methods`: An array of RPC method names that the plugin registered.