mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 18:57:06 +01:00
json: add "dynamic" field to plugin list
CHANGELOG: add "dynamic" field to plugin list
This commit is contained in:
parent
82a18813b3
commit
71cd07ea61
3 changed files with 9 additions and 2 deletions
|
@ -56,6 +56,7 @@ If **command** is "start", "startdir", "rescan" or "list":
|
|||
- **plugins** (array of objects):
|
||||
- **name** (string): full pathname of the plugin
|
||||
- **active** (boolean): status; plugin completed init and is operational, plugins are configured asynchronously.
|
||||
- **dynamic** (boolean): plugin can be stopped or started without restarting lightningd
|
||||
|
||||
If **command** is "stop":
|
||||
- **result** (string): A message saying it successfully stopped
|
||||
|
@ -80,4 +81,4 @@ RESOURCES
|
|||
Main web site: <https://github.com/ElementsProject/lightning>
|
||||
|
||||
[writing plugins]: PLUGINS.md
|
||||
[comment]: # ( SHA256STAMP:ee9c974be30d7870cb6a7785956548700b95d2d6b3fe4f18f7757afdfa015553)
|
||||
[comment]: # ( SHA256STAMP:5c3b25ecb137bfe7a81f80f0b4183a9e1282530ebfac3b1bc05fc5406f59cfc7)
|
||||
|
|
|
@ -48,7 +48,8 @@
|
|||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"active"
|
||||
"active",
|
||||
"dynamic"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
|
@ -58,6 +59,10 @@
|
|||
"active": {
|
||||
"type": "boolean",
|
||||
"description": "status; plugin completed init and is operational, plugins are configured asynchronously."
|
||||
},
|
||||
"dynamic": {
|
||||
"type": "boolean",
|
||||
"description": "plugin can be stopped or started without restarting lightningd"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ static struct command_result *plugin_dynamic_list_plugins(struct plugin_command
|
|||
json_add_string(response, "name", p->cmd);
|
||||
json_add_bool(response, "active",
|
||||
p->plugin_state == INIT_COMPLETE);
|
||||
json_add_bool(response, "dynamic", p->dynamic);
|
||||
json_object_end(response);
|
||||
}
|
||||
json_array_end(response);
|
||||
|
|
Loading…
Add table
Reference in a new issue