From 7b5b9060f45edafff45c0a465ad19963dff017a4 Mon Sep 17 00:00:00 2001 From: Arne Juul Date: Thu, 10 Jun 2021 17:03:32 +0000 Subject: rename helper class --- configd/src/apps/sentinel/report-connectivity.cpp | 6 +++--- configd/src/apps/sentinel/report-connectivity.h | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'configd') diff --git a/configd/src/apps/sentinel/report-connectivity.cpp b/configd/src/apps/sentinel/report-connectivity.cpp index fff9435abdf..a08ea7c45d1 100644 --- a/configd/src/apps/sentinel/report-connectivity.cpp +++ b/configd/src/apps/sentinel/report-connectivity.cpp @@ -10,15 +10,15 @@ using cloud::config::ModelConfig; namespace config::sentinel { -ConnectivityCheckResult::~ConnectivityCheckResult() = default; +SinglePing::~SinglePing() = default; -void ConnectivityCheckResult::returnStatus(bool ok) { +void SinglePing::returnStatus(bool ok) { status = ok ? "ok" : "ping failed"; LOG(debug, "peer %s [port %d] -> %s", peerName.c_str(), peerPort, status.c_str()); parent.requestDone(); } -void ConnectivityCheckResult::startCheck(FRT_Supervisor &orb) { +void SinglePing::startCheck(FRT_Supervisor &orb) { check = std::make_unique(*this, peerName, peerPort, orb, 2500); } diff --git a/configd/src/apps/sentinel/report-connectivity.h b/configd/src/apps/sentinel/report-connectivity.h index d44e4eb5549..d28368eca6c 100644 --- a/configd/src/apps/sentinel/report-connectivity.h +++ b/configd/src/apps/sentinel/report-connectivity.h @@ -18,14 +18,14 @@ namespace config::sentinel { class ReportConnectivity; -struct ConnectivityCheckResult : StatusCallback { +struct SinglePing : StatusCallback { ReportConnectivity& parent; std::string peerName; int peerPort; std::string status; std::unique_ptr check; - ConnectivityCheckResult(ReportConnectivity& owner, const std::string &hostname, int port) + SinglePing(ReportConnectivity& owner, const std::string &hostname, int port) : parent(owner), peerName(hostname), peerPort(port), @@ -33,10 +33,10 @@ struct ConnectivityCheckResult : StatusCallback { check(nullptr) {} - ConnectivityCheckResult(ConnectivityCheckResult &&) = default; - ConnectivityCheckResult(const ConnectivityCheckResult &) = default; + SinglePing(SinglePing &&) = default; + SinglePing(const SinglePing &) = default; - virtual ~ConnectivityCheckResult(); + virtual ~SinglePing(); void startCheck(FRT_Supervisor &orb); void returnStatus(bool ok) override; }; @@ -54,7 +54,7 @@ private: void finish() const; FRT_RPCRequest *_parentRequest; FRT_Supervisor &_orb; - std::vector _result; + std::vector _result; config::ConfigFetcher _configFetcher; std::mutex _lock; size_t _remaining; -- cgit v1.2.3