Append 'grpc' to the C++ service namespaces for google APIs
PiperOrigin-RevId: 302531346 Change-Id: I6ed8a2840679d3664cfb491a7560c3e8286aa622
This commit is contained in:
parent
77527d0df1
commit
c08ebde007
|
@ -56,7 +56,7 @@ def cc_proto_library(name, deps):
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
||||||
def cc_grpc_library(name, srcs, deps, **kwargs):
|
def cc_grpc_library(name, srcs, deps, service_namespace = "grpc", **kwargs):
|
||||||
"""Generates a cc library with grpc implementation and cc proto headers
|
"""Generates a cc library with grpc implementation and cc proto headers
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -72,6 +72,9 @@ def cc_grpc_library(name, srcs, deps, **kwargs):
|
||||||
generate_cc(
|
generate_cc(
|
||||||
name = codegen_grpc_target,
|
name = codegen_grpc_target,
|
||||||
srcs = srcs,
|
srcs = srcs,
|
||||||
|
flags = [
|
||||||
|
"services_namespace=" + service_namespace,
|
||||||
|
],
|
||||||
plugin = "@com_github_grpc_grpc//src/compiler:grpc_cpp_plugin",
|
plugin = "@com_github_grpc_grpc//src/compiler:grpc_cpp_plugin",
|
||||||
well_known_protos = True,
|
well_known_protos = True,
|
||||||
generate_mocks = True,
|
generate_mocks = True,
|
||||||
|
|
Loading…
Reference in New Issue