DaZeus
2.0
|
An init-style plugin runner and monitor. More...
#include <pluginmonitor.h>
Public Member Functions | |
PluginMonitor (SocketConfig *socket, std::string pluginDirectory, const std::vector< PluginConfig * > &plugins, const std::vector< NetworkConfig * > &networks) | |
~PluginMonitor () | |
bool | shouldRun () |
void | runOnce () |
void | sigchild () |
An init-style plugin runner and monitor.
This class takes several PluginConfig instantiations and runs those that can be run, and watches their state. If any of them quits, it re-runs them init-style: if respawning fails a few times in a short period, it places the plugin on incremental hold, meaning that it will continuously try to restart the plugin with longer intervals.
Plugins don't need to be run through PluginMonitor to connect to DaZeus: connecting directly to the socket is always possible. The added value is that PluginMonitor will auto-start the plugins and keep them running.
Definition at line 34 of file pluginmonitor.h.
dazeus::PluginMonitor::PluginMonitor | ( | SocketConfig * | socket, |
std::string | pluginDirectory, | ||
const std::vector< PluginConfig * > & | plugins, | ||
const std::vector< NetworkConfig * > & | networks | ||
) |
Definition at line 68 of file pluginmonitor.cpp.
dazeus::PluginMonitor::~PluginMonitor | ( | ) |
Definition at line 99 of file pluginmonitor.cpp.
void dazeus::PluginMonitor::runOnce | ( | ) |
Definition at line 289 of file pluginmonitor.cpp.
|
inline |
Definition at line 42 of file pluginmonitor.h.
|
inline |
Definition at line 44 of file pluginmonitor.h.