aboutsummaryrefslogtreecommitdiffstats
path: root/configd/src/apps/sentinel/check-completion-handler.h
blob: b5de129aab1fc366c95964a474f66b016552f34c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include "status-callback.h"
#include "peer-check.h"

namespace config::sentinel {

/**
 * Handles a checkConnectivity request by making an outgoing
 * ping request.  When the ping finishes, fills an answer
 * into the parent request and send the answer back.
 **/
class CheckCompletionHandler : public StatusCallback {
private:
    FRT_RPCRequest *_parentRequest;
public:
    CheckCompletionHandler(FRT_RPCRequest *parentRequest);
    virtual ~CheckCompletionHandler();
    void returnStatus(bool ok) override;
};

}