Wei-Yu Chen | ad55cb8 | 2022-02-15 20:07:01 +0800 | [diff] [blame] | 1 | # SPDX-FileCopyrightText: 2020 The Magma Authors. |
| 2 | # SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org> |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | |
| 6 | load("@rules_proto//proto:defs.bzl", "proto_library") |
| 7 | load("@rules_proto_grpc//cpp:defs.bzl", "cpp_grpc_library") |
| 8 | load("@rules_proto_grpc//cpp:defs.bzl", "cpp_proto_library") |
| 9 | |
| 10 | package(default_visibility = ["//visibility:public"]) |
| 11 | |
| 12 | cpp_proto_library( |
| 13 | name = "common_cpp_proto", |
| 14 | protos = [":common_proto"], |
| 15 | ) |
| 16 | |
| 17 | proto_library( |
| 18 | name = "common_proto", |
| 19 | srcs = ["common.proto"], |
| 20 | ) |
| 21 | |
| 22 | cpp_proto_library( |
| 23 | name = "digest_cpp_proto", |
| 24 | protos = [":digest_proto"], |
| 25 | ) |
| 26 | |
| 27 | proto_library( |
| 28 | name = "digest_proto", |
| 29 | srcs = ["digest.proto"], |
| 30 | deps = ["@protobuf//:any_proto"], |
| 31 | ) |
| 32 | |
| 33 | cpp_grpc_library( |
| 34 | name = "eventd_cpp_grpc", |
| 35 | protos = [":eventd_proto"], |
| 36 | deps = [":common_cpp_proto"], |
| 37 | ) |
| 38 | |
| 39 | proto_library( |
| 40 | name = "eventd_proto", |
| 41 | srcs = ["eventd.proto"], |
| 42 | deps = [":common_proto"], |
| 43 | ) |
| 44 | |
| 45 | cpp_grpc_library( |
| 46 | name = "directoryd_cpp_grpc", |
| 47 | protos = [":directoryd_proto"], |
| 48 | deps = [":common_cpp_proto"], |
| 49 | ) |
| 50 | |
| 51 | proto_library( |
| 52 | name = "directoryd_proto", |
| 53 | srcs = ["directoryd.proto"], |
| 54 | deps = [":common_proto"], |
| 55 | ) |
| 56 | |
| 57 | cpp_proto_library( |
| 58 | name = "redis_cpp_proto", |
| 59 | protos = [":redis_proto"], |
| 60 | ) |
| 61 | |
| 62 | proto_library( |
| 63 | name = "redis_proto", |
| 64 | srcs = ["redis.proto"], |
| 65 | ) |
| 66 | |
| 67 | proto_library( |
| 68 | name = "mconfigs_proto", |
| 69 | srcs = ["mconfig/mconfigs.proto"], |
| 70 | strip_import_prefix = "mconfig/", |
| 71 | deps = [":common_proto"], |
| 72 | ) |
| 73 | |
| 74 | cpp_proto_library( |
| 75 | name = "metrics_cpp_proto", |
| 76 | protos = [":metrics_proto"], |
| 77 | ) |
| 78 | |
| 79 | proto_library( |
| 80 | name = "metrics_proto", |
| 81 | srcs = ["prometheus/metrics.proto"], |
| 82 | strip_import_prefix = "prometheus/", |
| 83 | ) |
| 84 | |
| 85 | cpp_proto_library( |
| 86 | name = "metricsd_cpp_proto", |
| 87 | protos = [":metricsd_proto"], |
| 88 | deps = [ |
| 89 | ":common_cpp_proto", |
| 90 | ":metrics_cpp_proto", |
| 91 | ], |
| 92 | ) |
| 93 | |
| 94 | proto_library( |
| 95 | name = "metricsd_proto", |
| 96 | srcs = ["metricsd.proto"], |
| 97 | deps = [ |
| 98 | ":common_proto", |
| 99 | ":metrics_proto", |
| 100 | ], |
| 101 | ) |
| 102 | |
| 103 | cpp_grpc_library( |
| 104 | name = "service303_cpp_grpc", |
| 105 | protos = [":service303_proto"], |
| 106 | deps = [ |
| 107 | ":common_cpp_proto", |
| 108 | ":metricsd_cpp_proto", |
| 109 | ], |
| 110 | ) |
| 111 | |
| 112 | cpp_proto_library( |
| 113 | name = "service303_cpp_proto", |
| 114 | protos = [":service303_proto"], |
| 115 | deps = [ |
| 116 | ":common_cpp_proto", |
| 117 | ":metricsd_cpp_proto", |
| 118 | ], |
| 119 | ) |
| 120 | |
| 121 | proto_library( |
| 122 | name = "service303_proto", |
| 123 | srcs = ["service303.proto"], |
| 124 | deps = [ |
| 125 | ":common_proto", |
| 126 | ":metricsd_proto", |
| 127 | "@protobuf//:wrappers_proto", |
| 128 | ], |
| 129 | ) |