MXS-1441 Expose monitor_launch_command
So that a specific monitor may create the command and replace monitor specific script variables before giving the command for execution.
This commit is contained in:
@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include <maxscale/monitor.h>
|
||||
#include "externcmd.h"
|
||||
|
||||
MXS_BEGIN_DECLS
|
||||
|
||||
@ -104,4 +105,17 @@ MXS_MONITOR* monitor_server_in_use(const SERVER *server);
|
||||
*/
|
||||
int monitor_launch_script(MXS_MONITOR* mon, MXS_MONITORED_SERVER* ptr, const char* script, uint32_t timeout);
|
||||
|
||||
/**
|
||||
* Launch a command
|
||||
*
|
||||
* @param mon Owning monitor
|
||||
* @param ptr The server which has changed state
|
||||
* @param cmd The command to execute.
|
||||
*
|
||||
* @note All default script variables will be replaced.
|
||||
*
|
||||
* @return Return value of the executed script or -1 on error.
|
||||
*/
|
||||
int monitor_launch_command(MXS_MONITOR* mon, MXS_MONITORED_SERVER* ptr, EXTERNCMD* cmd);
|
||||
|
||||
MXS_END_DECLS
|
||||
|
||||
Reference in New Issue
Block a user