summaryrefslogtreecommitdiffstats
path: root/configd/src/apps/sentinel/outward-check.h
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2021-06-02 11:12:29 +0000
committerArne Juul <arnej@verizonmedia.com>2021-06-02 11:12:29 +0000
commit6a0ead14e709bf3ef93e75612b8f47ecab5cba66 (patch)
tree647b663a2da2c7aef22835a020c616bfd7c02858 /configd/src/apps/sentinel/outward-check.h
parentfa297614fef1c12b1a50a0afe0d753cfbc041b88 (diff)
ask for reverse connectivity check in OutwardCheck
Diffstat (limited to 'configd/src/apps/sentinel/outward-check.h')
-rw-r--r--configd/src/apps/sentinel/outward-check.h31
1 files changed, 15 insertions, 16 deletions
diff --git a/configd/src/apps/sentinel/outward-check.h b/configd/src/apps/sentinel/outward-check.h
index 563151af47b..8a0b036ac49 100644
--- a/configd/src/apps/sentinel/outward-check.h
+++ b/configd/src/apps/sentinel/outward-check.h
@@ -1,31 +1,30 @@
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include "status-callback.h"
-#include "peer-check.h"
+#include <string>
+#include <vespa/vespalib/util/count_down_latch.h>
#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/invoker.h>
+#include <vespa/fnet/frt/rpcrequest.h>
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/target.h>
namespace config::sentinel {
-class OutwardCheck : public StatusCallback {
+class OutwardCheck : public FRT_IRequestWait {
+private:
bool _wasOk = false;
bool _wasBad = false;
- PeerCheck _check;
+ FRT_Target *_target = nullptr;
+ FRT_RPCRequest *_req = nullptr;
+ std::string _spec;
+ vespalib::CountDownLatch &_countDownLatch;
public:
- OutwardCheck(const std::string &hostname, int portnumber, FRT_Supervisor &orb)
- : _check(*this, hostname, portnumber, orb)
- {}
+ OutwardCheck(const std::string &spec, const char * myHostname, int myPortnum,
+ FRT_Supervisor &orb, vespalib::CountDownLatch &latch);
virtual ~OutwardCheck();
+ void RequestDone(FRT_RPCRequest *req) override;
bool ok() const { return _wasOk; }
bool bad() const { return _wasBad; }
- void returnStatus(bool ok) override {
- if (ok) {
- _wasBad = false;
- _wasOk = true;
- } else {
- _wasOk = false;
- _wasBad = true;
- }
- }
};
}