MXS-1848 Use MXS_SPECIFIC_MONITOR type in monitor APIs
Now, all monitor functions but startMonitor takes a MXS_SPECIFIC_MONITOR instead of MXS_MONITOR. That is, startMonitor is now like a static factory member returning a new specific monitor instance and the other functions are like member functions of that instance.
This commit is contained in:
@ -87,17 +87,26 @@ typedef struct mxs_monitor_object
|
||||
*
|
||||
* @param monitor The monitor object
|
||||
*/
|
||||
void (*stopMonitor)(MXS_MONITOR *monitor);
|
||||
void (*diagnostics)(DCB *, const MXS_MONITOR *);
|
||||
void (*stopMonitor)(MXS_SPECIFIC_MONITOR *monitor);
|
||||
|
||||
/**
|
||||
* @brief Write diagnostic information to a DCB.
|
||||
*
|
||||
* @param monitor The monitor object.
|
||||
* @param dcb The dcb to write to.
|
||||
*/
|
||||
void (*diagnostics)(const MXS_SPECIFIC_MONITOR* monitor, DCB* dcb);
|
||||
|
||||
/**
|
||||
* @brief Return diagnostic information about the monitor
|
||||
*
|
||||
* @param monitor The monitor object.
|
||||
*
|
||||
* @return A JSON object representing the state of the monitor
|
||||
*
|
||||
* @see jansson.h
|
||||
*/
|
||||
json_t* (*diagnostics_json)(const MXS_MONITOR *monitor);
|
||||
json_t* (*diagnostics_json)(const MXS_SPECIFIC_MONITOR *monitor);
|
||||
} MXS_MONITOR_OBJECT;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user