YugabyteDB (2.13.1.0-b60, 21121d69985fbf76aa6958d8f04a9bfa936293b5)

Coverage Report

Created: 2022-03-22 16:43

/Users/deen/code/yugabyte-db/src/yb/master/master_replication_service.cc
Line
Count
Source
1
// Copyright (c) YugaByte, Inc.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
4
// in compliance with the License.  You may obtain a copy of the License at
5
//
6
// http://www.apache.org/licenses/LICENSE-2.0
7
//
8
// Unless required by applicable law or agreed to in writing, software distributed under the License
9
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
10
// or implied.  See the License for the specific language governing permissions and limitations
11
// under the License.
12
//
13
14
#include "yb/master/catalog_manager.h"
15
#include "yb/master/master_replication.service.h"
16
#include "yb/master/master_service_base.h"
17
#include "yb/master/master_service_base-internal.h"
18
19
namespace yb {
20
namespace master {
21
22
namespace {
23
24
class MasterReplicationServiceImpl : public MasterServiceBase, public MasterReplicationIf {
25
 public:
26
  explicit MasterReplicationServiceImpl(Master* master)
27
8.03k
      : MasterServiceBase(master), MasterReplicationIf(master->metric_entity()) {}
28
29
  MASTER_SERVICE_IMPL_ON_LEADER_WITH_LOCK(
30
    CatalogManager,
31
    (ValidateReplicationInfo)
32
  )
33
34
  MASTER_SERVICE_IMPL_ON_LEADER_WITH_LOCK(
35
    enterprise::CatalogManager,
36
    (AlterUniverseReplication)
37
    (CreateCDCStream)
38
    (DeleteCDCStream)
39
    (DeleteUniverseReplication)
40
    (GetCDCStream)
41
    (GetUniverseReplication)
42
    (IsSetupUniverseReplicationDone)
43
    (UpdateConsumerOnProducerSplit)
44
    (ListCDCStreams)
45
    (SetUniverseReplicationEnabled)
46
    (SetupUniverseReplication)
47
    (UpdateCDCStream)
48
    (GetCDCDBStreamInfo)
49
  )
50
};
51
52
} // namespace
53
54
8.03k
std::unique_ptr<rpc::ServiceIf> MakeMasterReplicationService(Master* master) {
55
8.03k
  return std::make_unique<MasterReplicationServiceImpl>(master);
56
8.03k
}
57
58
} // namespace master
59
} // namespace yb