aboutsummaryrefslogtreecommitdiffstats
path: root/configd
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2021-06-10 17:03:32 +0000
committerArne Juul <arnej@verizonmedia.com>2021-06-10 17:03:32 +0000
commit7b5b9060f45edafff45c0a465ad19963dff017a4 (patch)
tree21e1a38a1f3ff349d113c0ce72f94e513c3b1bd3 /configd
parenta7f980e01ca483c30b4533f3835bb9b60e5a78ca (diff)
rename helper class
Diffstat (limited to 'configd')
-rw-r--r--configd/src/apps/sentinel/report-connectivity.cpp6
-rw-r--r--configd/src/apps/sentinel/report-connectivity.h12
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;