MXS-1944 Store failover parameters in an object

Several of the parameters are passed on from function to function. Having them all
in an object cleans things up and makes adding more data easier.
This commit is contained in:
Esa Korhonen
2018-09-17 10:26:06 +03:00
parent 92832c1ec4
commit c20a17238b
6 changed files with 125 additions and 103 deletions

View File

@ -32,3 +32,16 @@ void DelimitedPrinter::cat(string& target, const string& addition)
target += m_current_separator + addition;
m_current_separator = m_separator;
}
ClusterOperation::ClusterOperation(OperationType type,
MariaDBServer* promotion_target, MariaDBServer* demotion_target,
bool demo_target_is_master, bool handle_events,
json_t** error, maxbase::Duration time_remaining)
: type(type)
, promotion_target(promotion_target)
, demotion_target(demotion_target)
, demotion_target_is_master(demo_target_is_master)
, handle_events(handle_events)
, error_out(error)
, time_remaining(time_remaining)
{}