26#ifndef MYSQL_HARNESS_LOG_REOPEN_INCLUDED
27#define MYSQL_HARNESS_LOG_REOPEN_INCLUDED
33#include "harness_export.h"
69 bool is_active()
const {
return state_ == State::ACTIVE; }
74 std::string
errmsg()
const {
return errmsg_; }
113 void request_reopen(
const std::string &dst =
"");
118 bool completed()
const;
123 std::string get_last_error()
const;
130 void set_complete_callback(reopen_callback cb);
Monitor pattern.
Definition: monitor.h:39
Monitor can be waited for.
Definition: monitor.h:62
Definition: log_reopen.h:42
State
Definition: log_reopen.h:60
bool is_completed() const
Definition: log_reopen.h:63
std::string errmsg_
Definition: log_reopen.h:88
bool is_active() const
Definition: log_reopen.h:69
void state(State st)
Definition: log_reopen.h:80
State state() const
Definition: log_reopen.h:81
void destination(const std::string &dst)
Definition: log_reopen.h:77
bool is_shutdown() const
Definition: log_reopen.h:71
std::string dst_
Definition: log_reopen.h:91
void errmsg(const std::string &errmsg)
Definition: log_reopen.h:75
std::string errmsg() const
Definition: log_reopen.h:74
bool is_requested() const
Definition: log_reopen.h:66
std::string destination() const
Definition: log_reopen.h:78
void request_reopen(const std::string &dst="")
request reopen
Definition: log_reopen.h:38
LogReopen()
Definition: log_reopen.h:94
std::thread reopen_thr_
Definition: log_reopen.h:150
std::function< void(const std::string &)> reopen_callback
Definition: log_reopen.h:40
static void main_loop(LogReopen *self)
Definition: log_reopen.cc:113
friend void main_loop(LogReopen *self)
@ NONE
Definition: base.h:45
std::string join(const detail::range auto &rng, std::string_view delim)
join elements of a range into a string separated by a delimiter.
Definition: string.h:74
#define SHUTDOWN
Definition: sql_yacc.h:1374