Append 'grpc' to the C++ service namespaces for google APIs

PiperOrigin-RevId: 302531346
Change-Id: I6ed8a2840679d3664cfb491a7560c3e8286aa622
This commit is contained in:
A. Unique TensorFlower 2020-03-23 15:28:47 -07:00 committed by TensorFlower Gardener
parent 77527d0df1
commit c08ebde007
1 changed files with 4 additions and 1 deletions

View File

@ -56,7 +56,7 @@ def cc_proto_library(name, deps):
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
Args:
@ -72,6 +72,9 @@ def cc_grpc_library(name, srcs, deps, **kwargs):
generate_cc(
name = codegen_grpc_target,
srcs = srcs,
flags = [
"services_namespace=" + service_namespace,
],
plugin = "@com_github_grpc_grpc//src/compiler:grpc_cpp_plugin",
well_known_protos = True,
generate_mocks = True,