plugin: Register plugin cli options

We also make `--help` a non-early arg so it allows for the plugins to
register their options before printing the help message. The options
themselves are stored in a separate struct inbetween them being
registered and them being forwarded to the plugin. Currently only
supports string options.

Signed-off-by: Christian Decker <@cdecker>
This commit is contained in:
Christian Decker
2018-11-02 01:19:47 +01:00
parent 10338983a6
commit 55d6d6b0e7
3 changed files with 116 additions and 3 deletions

View File

@@ -19,7 +19,10 @@ def json_hello(request):
def json_init(request):
return {
"options": [
{"name": "greeting", "type": "string", "default": "World"},
{"name": "greeting",
"type": "string",
"default": "World",
"description": "What name should I call you?"},
],
"rpcmethods": [
{