IceFlow NDN-based stream processing library written in C++
Loading...
Searching...
No Matches
congestion-reporter.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_CONGESTION_REPORTER_HPP
20#define ICEFLOW_CONGESTION_REPORTER_HPP
21
22#ifdef USE_GRPC
23
24#include "node-executor.pb.h"
25
26#else // !USE_GRPC
27
28enum CongestionReason : int {
29 CONGESTION_REASON_NETWORK = 0,
30 CONGESTION_REASON_PROCESSING = 1
31};
32
33#endif // USE_GRPC
34
35namespace iceflow {
36
38public:
39 virtual ~CongestionReporter() {}
40
41 virtual void reportCongestion(CongestionReason congestionReason,
42 const std::string &edgeName) = 0;
43};
44
45} // namespace iceflow
46
47#endif // ICEFLOW_CONGESTION_REPORTER_HPP
Definition congestion-reporter.hpp:37