YugabyteDB (2.13.0.0-b42, bfc6a6643e7399ac8a0e81d06a3ee6d6571b33ab)

Coverage Report

Created: 2022-03-09 17:30

/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/tserver/tserver_forward_service.service.h
Line
Count
Source (jump to first uncovered line)
1
// THIS FILE IS AUTOGENERATED FROM yb/tserver/tserver_forward_service.proto
2
3
#ifndef YB_TSERVER_TSERVER_FORWARD_SERVICE_SERVICE_IF_DOT_H
4
#define YB_TSERVER_TSERVER_FORWARD_SERVICE_SERVICE_IF_DOT_H
5
6
#include "yb/tserver/tserver_forward_service.pb.h"
7
8
#include <string>
9
10
#include "yb/rpc/rpc_fwd.h"
11
#include "yb/rpc/rpc_header.pb.h"
12
#include "yb/rpc/service_if.h"
13
14
#include "yb/util/monotime.h"
15
16
namespace yb {
17
class MetricEntity;
18
} // namespace yb
19
20
namespace yb {
21
namespace tserver {
22
23
enum class TabletServerForwardServiceRpcMethodIndexes {
24
  kWrite,
25
  kRead,
26
}; // enum
27
28
class TabletServerForwardServiceIf : public ::yb::rpc::ServiceIf {
29
 public:
30
  explicit TabletServerForwardServiceIf(const scoped_refptr<MetricEntity>& entity);
31
  virtual ~TabletServerForwardServiceIf();
32
  void Handle(::yb::rpc::InboundCallPtr call) override;
33
  void FillEndpoints(const ::yb::rpc::RpcServicePtr& service, ::yb::rpc::RpcEndpointMap* map) override;
34
  std::string service_name() const override;
35
  static std::string static_service_name();
36
37
  virtual void Write(
38
      const ::yb::tserver::WriteRequestPB* req,
39
      ::yb::tserver::WriteResponsePB* resp,
40
      ::yb::rpc::RpcContext context) = 0;
41
  virtual void Read(
42
      const ::yb::tserver::ReadRequestPB* req,
43
      ::yb::tserver::ReadResponsePB* resp,
44
      ::yb::rpc::RpcContext context) = 0;
45
  
46
0
  ::yb::rpc::RpcMethodMetrics GetMetric(TabletServerForwardServiceRpcMethodIndexes index) {
47
0
    return methods_[static_cast<size_t>(index)].metrics;
48
0
  }
49
50
 private:
51
  static const int kMethodCount = 2;
52
53
  // Pre-initialize metrics because calling METRIC_foo.Instantiate() is expensive.
54
  void InitMethods(const scoped_refptr<MetricEntity>& ent);
55
56
  ::yb::rpc::RpcMethodDesc methods_[kMethodCount];
57
};
58
59
} // namespace tserver
60
} // namespace yb
61
62
#endif