diff options
Diffstat (limited to 'configd/src')
-rw-r--r-- | configd/src/apps/sentinel/report-connectivity.cpp | 6 | ||||
-rw-r--r-- | configd/src/apps/sentinel/report-connectivity.h | 12 |
2 files changed, 9 insertions, 9 deletions
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<PeerCheck>(*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<PeerCheck> 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<ConnectivityCheckResult> _result; + std::vector<SinglePing> _result; config::ConfigFetcher _configFetcher; std::mutex _lock; size_t _remaining; |