aboutsummaryrefslogtreecommitdiffstats
path: root/configd/src/apps/sentinel/rpcserver.h
blob: b0104c4ed104ad3dee28d7e6f01dd12633414c86 (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
25
26
27
28
29
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <memory>

#include "cmdq.h"
#include "model-owner.h"
#include "rpchooks.h"
#include <vespa/fnet/frt/supervisor.h>

namespace config::sentinel {

class RpcServer
{
private:
    fnet::frt::StandaloneFRT _server;
    RPCHooks _rpcHooks;
    int _port;

public:
    RpcServer(int port, CommandQueue &cmdQ, ModelOwner &modelOwner);
    ~RpcServer();

    int getPort() const { return _port; }
    FRT_Supervisor &orb() { return _server.supervisor(); }
};

} // namespace config::sentinel