* Added: stats RPC for clixon XML and memory statistics.
  * Added: restart-plugin RPC for restarting individual plugins without restarting backend.
* xml-stats moved from clixon-config.yang as state data to an rpc `datastats` in clixon-lib.yang
* Experimental: restart_plugin
* Two new plugin callbacks added
  * ca_daemon: Called just after a server has "daemonized", ie put in background.
  * ca_trans_commit_done: Called when all plugin commits have been done.
    * Note: If you have used "end" callback and usign transaction data, you should probably use this instead.
This commit is contained in:
Olof hagsand 2020-04-28 22:10:06 +02:00
parent 1c99bd6a9b
commit 9a8c6cf3e6
25 changed files with 926 additions and 308 deletions

View file

@ -122,7 +122,7 @@ backend_terminate(clicon_handle h)
if ((x = clicon_conf_xml(h)) != NULL)
xml_free(x);
stream_publish_exit();
clixon_plugin_exit(h);
clixon_plugin_exit_all(h);
/* Delete all backend plugin RPC callbacks */
rpc_callback_delete_all(h);
/* Delete all backend plugin upgrade callbacks */
@ -867,7 +867,7 @@ main(int argc,
clicon_log(LOG_NOTICE, "%s: %u %s", __PROGRAM__, getpid(), cbuf_get(cbret));
/* Call backend plugin_start with user -- options */
if (clixon_plugin_start(h) < 0)
if (clixon_plugin_start_all(h) < 0)
goto done;
/* -1 option to run only once */
if (once)
@ -886,7 +886,7 @@ main(int argc,
}
/* Call plugin callbacks when in background and before dropped privileges */
if (clixon_plugin_daemon(h) < 0)
if (clixon_plugin_daemon_all(h) < 0)
goto done;
/* Write pid-file */