IceFlow NDN-based stream processing library written in C++
Loading...
Searching...
No Matches
node-executor-service.hpp
1/*
2 * Copyright 2024 The IceFlow Authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * SPDX-License-Identifier: Apache-2.0
17 */
18
19#ifndef ICEFLOW_NODE_EXECUTOR_SERVICE_H
20#define ICEFLOW_NODE_EXECUTOR_SERVICE_H
21
22#ifdef USE_GRPC
23
24#include "node-executor.grpc.pb.h"
25#include "node-executor.pb.h"
26
27#include <grpc/grpc.h>
28#include <grpcpp/server_builder.h>
29
30#include "executor.hpp"
31
32namespace iceflow {
33
34class NodeExecutorService final : public NodeExecutor::Service {
35public:
36 explicit NodeExecutorService(std::weak_ptr<IceflowExecutor> executor);
37
38public:
39 virtual grpc::Status ReportCongestion(grpc::ServerContext *context,
40 const CongestionReportRequest *request,
41 CongestionReportResponse *response);
42
43private:
44 std::weak_ptr<IceflowExecutor> m_executor;
45};
46} // namespace iceflow
47
48#endif // USE_GRPC
49
50#endif // ICEFLOW_NODE_EXECUTOR_SERVICE_H