DaZeus  2.0
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
dazeus::PluginMonitor Class Reference

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 ()
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Member Function Documentation

void dazeus::PluginMonitor::runOnce ( )

Definition at line 289 of file pluginmonitor.cpp.

bool dazeus::PluginMonitor::shouldRun ( )
inline

Definition at line 42 of file pluginmonitor.h.

void dazeus::PluginMonitor::sigchild ( )
inline

Definition at line 44 of file pluginmonitor.h.


The documentation for this class was generated from the following files: