MXS-2271 Move script-related settings to the settings-container
Also moves related functions to class methods.
This commit is contained in:
@ -19,14 +19,14 @@
|
||||
|
||||
MXS_BEGIN_DECLS
|
||||
|
||||
typedef struct extern_cmd_t
|
||||
struct EXTERNCMD
|
||||
{
|
||||
char** argv; /**< Argument vector for the command, first being the
|
||||
* actual command being executed */
|
||||
int n_exec; /**< Number of times executed */
|
||||
pid_t child; /**< PID of the child process */
|
||||
uint32_t timeout; /**< Command timeout in seconds */
|
||||
} EXTERNCMD;
|
||||
};
|
||||
|
||||
char* externcmd_extract_command(const char* argstr);
|
||||
|
||||
|
@ -139,7 +139,6 @@ bool monitor_remove_parameter(Monitor* monitor, const char* key);
|
||||
void monitor_set_parameter(Monitor* monitor, const char* key, const char* value);
|
||||
|
||||
void monitor_set_journal_max_age(Monitor* mon, time_t value);
|
||||
void monitor_set_script_timeout(Monitor* mon, uint32_t value);
|
||||
|
||||
/**
|
||||
* @brief Serialize a monitor to a file
|
||||
@ -157,28 +156,3 @@ bool monitor_serialize(const Monitor* monitor);
|
||||
* @return The monitor watching this server, or NULL if not monitored
|
||||
*/
|
||||
Monitor* monitor_server_in_use(const SERVER* server);
|
||||
|
||||
/**
|
||||
* Launch a script
|
||||
*
|
||||
* @param mon Owning monitor
|
||||
* @param ptr The server which has changed state
|
||||
* @param script Script to execute
|
||||
* @param timeout Timeout in seconds for the script
|
||||
*
|
||||
* @return Return value of the executed script or -1 on error
|
||||
*/
|
||||
int monitor_launch_script(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(Monitor* mon, MXS_MONITORED_SERVER* ptr, EXTERNCMD* cmd);
|
||||
|
Reference in New Issue
Block a user