Merge remote-tracking branch 'upstream/master' into fork_exec_ctx_check
This commit is contained in:
commit
4fad281ce8
|
|
@ -3,5 +3,10 @@ Language: Cpp
|
|||
BasedOnStyle: Google
|
||||
DerivePointerAlignment: false
|
||||
PointerAlignment: Left
|
||||
---
|
||||
Language: ObjC
|
||||
BasedOnStyle: Google
|
||||
ColumnLimit: 100
|
||||
ObjCBlockIndentWidth: 2
|
||||
...
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@
|
|||
/**/OWNERS @markdroth @nicolasnoble @a11r
|
||||
/bazel/** @nicolasnoble @dgquintas @a11r @vjpai
|
||||
/cmake/** @jtattermusch @nicolasnoble @matt-kwong
|
||||
/src/core/ext/filters/client_channel/** @markdroth @dgquintas @a11r
|
||||
/src/core/ext/filters/client_channel/** @markdroth @dgquintas @AspirinSJL
|
||||
/tools/dockerfile/** @jtattermusch @matt-kwong @nicolasnoble
|
||||
/tools/run_tests/performance/** @ncteisen @matt-kwong @jtattermusch
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
Please answer these questions before submitting your issue.
|
||||
|
||||
### Should this be an issue in the gRPC issue tracker?
|
||||
|
||||
Create new issues for bugs and feature requests. An issue needs to be actionable. General gRPC discussions and usage questions belong to:
|
||||
- [grpc.io mailing list](https://groups.google.com/forum/#!forum/grpc-io)
|
||||
- [StackOverflow, with `grpc` tag](http://stackoverflow.com/questions/tagged/grpc)
|
||||
|
||||
*Please don't double post your questions in more locations; we are monitoring both channels, and the time spent de-duplicating questions is better spent answering more user questions.*
|
||||
<!--
|
||||
|
||||
This form is for bug reports and feature requests ONLY!
|
||||
For general questions and troubleshooting, please ask/look for answers here:
|
||||
- grpc.io mailing list: https://groups.google.com/forum/#!forum/grpc-io
|
||||
- StackOverflow, with "grpc" tag: http://stackoverflow.com/questions/tagged/grpc
|
||||
|
||||
Issues specific to *grpc-java*, *grpc-go*, *grpc-node*, *grpc-dart*, *grpc-web* should be created in the repository they belong to (e.g. https://github.com/grpc/grpc-LANGUAGE/issues/new)
|
||||
-->
|
||||
|
||||
### What version of gRPC and what language are you using?
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,10 @@ python_pylint_venv/
|
|||
htmlcov/
|
||||
dist/
|
||||
*.egg
|
||||
py27/
|
||||
py3[0-9]*/
|
||||
py27_gevent/
|
||||
py27_native/
|
||||
py3[0-9]_gevent/
|
||||
py3[0-9]_native/
|
||||
|
||||
# Node installation output
|
||||
node_modules
|
||||
|
|
|
|||
|
|
@ -0,0 +1,108 @@
|
|||
[VARIABLES]
|
||||
|
||||
# TODO(https://github.com/PyCQA/pylint/issues/1345): How does the inspection
|
||||
# not include "unused_" and "ignored_" by default?
|
||||
dummy-variables-rgx=^ignored_|^unused_
|
||||
|
||||
[DESIGN]
|
||||
|
||||
# NOTE(nathaniel): Not particularly attached to this value; it just seems to
|
||||
# be what works for us at the moment (excepting the dead-code-walking Beta
|
||||
# API).
|
||||
max-args=6
|
||||
|
||||
[MISCELLANEOUS]
|
||||
|
||||
# NOTE(nathaniel): We are big fans of "TODO(<issue link>): " and
|
||||
# "NOTE(<username or issue link>): ". We do not allow "TODO:",
|
||||
# "TODO(<username>):", "FIXME:", or anything else.
|
||||
notes=FIXME,XXX
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
|
||||
disable=
|
||||
# These suppressions are specific to tests:
|
||||
#
|
||||
# TODO(https://github.com/grpc/grpc/issues/261): investigate
|
||||
# each of the following one by one and consider eliminating
|
||||
# the suppression category.
|
||||
# Eventually, the hope is to eliminate the .pylintrc-tests
|
||||
# altogether and rely on .pylintrc for everything.
|
||||
pointless-statement,
|
||||
no-member,
|
||||
no-self-use,
|
||||
attribute-defined-outside-init,
|
||||
unused-argument,
|
||||
unused-variable,
|
||||
unused-import,
|
||||
redefined-builtin,
|
||||
too-many-public-methods,
|
||||
too-many-locals,
|
||||
redefined-variable-type,
|
||||
redefined-outer-name,
|
||||
ungrouped-imports,
|
||||
too-many-branches,
|
||||
too-many-arguments,
|
||||
too-many-format-args,
|
||||
too-many-return-statements,
|
||||
too-many-statements,
|
||||
line-too-long,
|
||||
wrong-import-position,
|
||||
wrong-import-order,
|
||||
# -- END OF TEST-SPECIFIC SUPPRESSIONS --
|
||||
|
||||
|
||||
# TODO(https://github.com/PyCQA/pylint/issues/59#issuecomment-283774279):
|
||||
# Enable cyclic-import after a 1.7-or-later pylint release that
|
||||
# recognizes our disable=cyclic-import suppressions.
|
||||
cyclic-import,
|
||||
# TODO(https://github.com/grpc/grpc/issues/8622): Enable this after the
|
||||
# Beta API is removed.
|
||||
duplicate-code,
|
||||
# TODO(https://github.com/grpc/grpc/issues/261): Doesn't seem to
|
||||
# understand enum and concurrent.futures; look into this later with the
|
||||
# latest pylint version.
|
||||
import-error,
|
||||
# TODO(https://github.com/grpc/grpc/issues/261): Enable this one.
|
||||
# Should take a little configuration but not much.
|
||||
invalid-name,
|
||||
# TODO(https://github.com/grpc/grpc/issues/261): This doesn't seem to
|
||||
# work for now? Try with a later pylint?
|
||||
locally-disabled,
|
||||
# NOTE(nathaniel): What even is this? *Enabling* an inspection results
|
||||
# in a warning? How does that encourage more analysis and coverage?
|
||||
locally-enabled,
|
||||
# NOTE(nathaniel): We don't write doc strings for most private code
|
||||
# elements.
|
||||
missing-docstring,
|
||||
# NOTE(nathaniel): In numeric comparisons it is better to have the
|
||||
# lesser (or lesser-or-equal-to) quantity on the left when the
|
||||
# expression is true than it is to worry about which is an identifier
|
||||
# and which a literal value.
|
||||
misplaced-comparison-constant,
|
||||
# NOTE(nathaniel): Our completely abstract interface classes don't have
|
||||
# constructors.
|
||||
no-init,
|
||||
# TODO(https://github.com/grpc/grpc/issues/261): Doesn't yet play
|
||||
# nicely with some of our code being implemented in Cython. Maybe in a
|
||||
# later version?
|
||||
no-name-in-module,
|
||||
# TODO(https://github.com/grpc/grpc/issues/261): Suppress these where
|
||||
# the odd shape of the authentication portion of the API forces them on
|
||||
# us and enable everywhere else.
|
||||
protected-access,
|
||||
# NOTE(nathaniel): Pylint and I will probably never agree on this.
|
||||
too-few-public-methods,
|
||||
# NOTE(nathaniel): Pylint and I wil probably never agree on this for
|
||||
# private classes. For public classes maybe?
|
||||
too-many-instance-attributes,
|
||||
# NOTE(nathaniel): Some of our modules have a lot of lines... of
|
||||
# specification and documentation. Maybe if this were
|
||||
# lines-of-code-based we would use it.
|
||||
too-many-lines,
|
||||
# TODO(https://github.com/grpc/grpc/issues/261): Maybe we could have
|
||||
# this one if we extracted just a few more helper functions...
|
||||
too-many-nested-blocks,
|
||||
# NOTE(nathaniel): I have disputed the premise of this inspection from
|
||||
# the beginning and will continue to do so until it goes away for good.
|
||||
useless-else-on-loop,
|
||||
112
BUILD
112
BUILD
|
|
@ -64,11 +64,11 @@ config_setting(
|
|||
)
|
||||
|
||||
# This should be updated along with build.yaml
|
||||
g_stands_for = "gorgeous"
|
||||
g_stands_for = "gloriosa"
|
||||
|
||||
core_version = "6.0.0-dev"
|
||||
|
||||
version = "1.11.0-dev"
|
||||
version = "1.13.0-dev"
|
||||
|
||||
GPR_PUBLIC_HDRS = [
|
||||
"include/grpc/support/alloc.h",
|
||||
|
|
@ -141,7 +141,6 @@ GRPCXX_SRCS = [
|
|||
"src/cpp/server/server_posix.cc",
|
||||
"src/cpp/thread_manager/thread_manager.cc",
|
||||
"src/cpp/util/byte_buffer_cc.cc",
|
||||
"src/cpp/util/slice_cc.cc",
|
||||
"src/cpp/util/status.cc",
|
||||
"src/cpp/util/string_ref.cc",
|
||||
"src/cpp/util/time_cc.cc",
|
||||
|
|
@ -245,6 +244,8 @@ GRPCXX_PUBLIC_HDRS = [
|
|||
"include/grpcpp/support/byte_buffer.h",
|
||||
"include/grpcpp/support/channel_arguments.h",
|
||||
"include/grpcpp/support/config.h",
|
||||
"include/grpcpp/support/proto_buffer_reader.h",
|
||||
"include/grpcpp/support/proto_buffer_writer.h",
|
||||
"include/grpcpp/support/slice.h",
|
||||
"include/grpcpp/support/status.h",
|
||||
"include/grpcpp/support/status_code_enum.h",
|
||||
|
|
@ -676,10 +677,13 @@ grpc_cc_library(
|
|||
"src/core/lib/channel/channel_args.cc",
|
||||
"src/core/lib/channel/channel_stack.cc",
|
||||
"src/core/lib/channel/channel_stack_builder.cc",
|
||||
"src/core/lib/channel/channel_trace.cc",
|
||||
"src/core/lib/channel/channel_trace_registry.cc",
|
||||
"src/core/lib/channel/connected_channel.cc",
|
||||
"src/core/lib/channel/handshaker.cc",
|
||||
"src/core/lib/channel/handshaker_factory.cc",
|
||||
"src/core/lib/channel/handshaker_registry.cc",
|
||||
"src/core/lib/channel/status_util.cc",
|
||||
"src/core/lib/compression/compression.cc",
|
||||
"src/core/lib/compression/compression_internal.cc",
|
||||
"src/core/lib/compression/message_compress.cc",
|
||||
|
|
@ -713,20 +717,25 @@ grpc_cc_library(
|
|||
"src/core/lib/iomgr/gethostname_sysconf.cc",
|
||||
"src/core/lib/iomgr/iocp_windows.cc",
|
||||
"src/core/lib/iomgr/iomgr.cc",
|
||||
"src/core/lib/iomgr/iomgr_custom.cc",
|
||||
"src/core/lib/iomgr/iomgr_internal.cc",
|
||||
"src/core/lib/iomgr/iomgr_posix.cc",
|
||||
"src/core/lib/iomgr/iomgr_uv.cc",
|
||||
"src/core/lib/iomgr/iomgr_windows.cc",
|
||||
"src/core/lib/iomgr/is_epollexclusive_available.cc",
|
||||
"src/core/lib/iomgr/load_file.cc",
|
||||
"src/core/lib/iomgr/lockfree_event.cc",
|
||||
"src/core/lib/iomgr/network_status_tracker.cc",
|
||||
"src/core/lib/iomgr/polling_entity.cc",
|
||||
"src/core/lib/iomgr/pollset_set_uv.cc",
|
||||
"src/core/lib/iomgr/pollset.cc",
|
||||
"src/core/lib/iomgr/pollset_custom.cc",
|
||||
"src/core/lib/iomgr/pollset_set.cc",
|
||||
"src/core/lib/iomgr/pollset_set_custom.cc",
|
||||
"src/core/lib/iomgr/pollset_set_windows.cc",
|
||||
"src/core/lib/iomgr/pollset_uv.cc",
|
||||
"src/core/lib/iomgr/pollset_windows.cc",
|
||||
"src/core/lib/iomgr/resolve_address.cc",
|
||||
"src/core/lib/iomgr/resolve_address_custom.cc",
|
||||
"src/core/lib/iomgr/resolve_address_posix.cc",
|
||||
"src/core/lib/iomgr/resolve_address_uv.cc",
|
||||
"src/core/lib/iomgr/resolve_address_windows.cc",
|
||||
"src/core/lib/iomgr/resource_quota.cc",
|
||||
"src/core/lib/iomgr/sockaddr_utils.cc",
|
||||
|
|
@ -735,22 +744,26 @@ grpc_cc_library(
|
|||
"src/core/lib/iomgr/socket_utils_common_posix.cc",
|
||||
"src/core/lib/iomgr/socket_utils_linux.cc",
|
||||
"src/core/lib/iomgr/socket_utils_posix.cc",
|
||||
"src/core/lib/iomgr/socket_utils_uv.cc",
|
||||
"src/core/lib/iomgr/socket_utils_windows.cc",
|
||||
"src/core/lib/iomgr/socket_windows.cc",
|
||||
"src/core/lib/iomgr/tcp_client.cc",
|
||||
"src/core/lib/iomgr/tcp_client_custom.cc",
|
||||
"src/core/lib/iomgr/tcp_client_posix.cc",
|
||||
"src/core/lib/iomgr/tcp_client_uv.cc",
|
||||
"src/core/lib/iomgr/tcp_client_windows.cc",
|
||||
"src/core/lib/iomgr/tcp_custom.cc",
|
||||
"src/core/lib/iomgr/tcp_posix.cc",
|
||||
"src/core/lib/iomgr/tcp_server.cc",
|
||||
"src/core/lib/iomgr/tcp_server_custom.cc",
|
||||
"src/core/lib/iomgr/tcp_server_posix.cc",
|
||||
"src/core/lib/iomgr/tcp_server_utils_posix_common.cc",
|
||||
"src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc",
|
||||
"src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc",
|
||||
"src/core/lib/iomgr/tcp_server_uv.cc",
|
||||
"src/core/lib/iomgr/tcp_server_windows.cc",
|
||||
"src/core/lib/iomgr/tcp_uv.cc",
|
||||
"src/core/lib/iomgr/tcp_windows.cc",
|
||||
"src/core/lib/iomgr/time_averaged_stats.cc",
|
||||
"src/core/lib/iomgr/timer.cc",
|
||||
"src/core/lib/iomgr/timer_custom.cc",
|
||||
"src/core/lib/iomgr/timer_generic.cc",
|
||||
"src/core/lib/iomgr/timer_heap.cc",
|
||||
"src/core/lib/iomgr/timer_manager.cc",
|
||||
|
|
@ -811,11 +824,14 @@ grpc_cc_library(
|
|||
"src/core/lib/channel/channel_args.h",
|
||||
"src/core/lib/channel/channel_stack.h",
|
||||
"src/core/lib/channel/channel_stack_builder.h",
|
||||
"src/core/lib/channel/channel_trace.h",
|
||||
"src/core/lib/channel/channel_trace_registry.h",
|
||||
"src/core/lib/channel/connected_channel.h",
|
||||
"src/core/lib/channel/context.h",
|
||||
"src/core/lib/channel/handshaker.h",
|
||||
"src/core/lib/channel/handshaker_factory.h",
|
||||
"src/core/lib/channel/handshaker_registry.h",
|
||||
"src/core/lib/channel/status_util.h",
|
||||
"src/core/lib/compression/algorithm_metadata.h",
|
||||
"src/core/lib/compression/compression_internal.h",
|
||||
"src/core/lib/compression/message_compress.h",
|
||||
|
|
@ -845,9 +861,9 @@ grpc_cc_library(
|
|||
"src/core/lib/iomgr/gethostname.h",
|
||||
"src/core/lib/iomgr/iocp_windows.h",
|
||||
"src/core/lib/iomgr/iomgr.h",
|
||||
"src/core/lib/iomgr/iomgr_custom.h",
|
||||
"src/core/lib/iomgr/iomgr_internal.h",
|
||||
"src/core/lib/iomgr/iomgr_posix.h",
|
||||
"src/core/lib/iomgr/iomgr_uv.h",
|
||||
"src/core/lib/iomgr/is_epollexclusive_available.h",
|
||||
"src/core/lib/iomgr/load_file.h",
|
||||
"src/core/lib/iomgr/lockfree_event.h",
|
||||
|
|
@ -855,14 +871,18 @@ grpc_cc_library(
|
|||
"src/core/lib/iomgr/network_status_tracker.h",
|
||||
"src/core/lib/iomgr/polling_entity.h",
|
||||
"src/core/lib/iomgr/pollset.h",
|
||||
"src/core/lib/iomgr/pollset_custom.h",
|
||||
"src/core/lib/iomgr/pollset_set.h",
|
||||
"src/core/lib/iomgr/pollset_set_custom.h",
|
||||
"src/core/lib/iomgr/pollset_set_windows.h",
|
||||
"src/core/lib/iomgr/pollset_uv.h",
|
||||
"src/core/lib/iomgr/pollset_windows.h",
|
||||
"src/core/lib/iomgr/port.h",
|
||||
"src/core/lib/iomgr/resolve_address.h",
|
||||
"src/core/lib/iomgr/resolve_address_custom.h",
|
||||
"src/core/lib/iomgr/resource_quota.h",
|
||||
"src/core/lib/iomgr/sockaddr.h",
|
||||
"src/core/lib/iomgr/sockaddr_custom.h",
|
||||
"src/core/lib/iomgr/sockaddr_posix.h",
|
||||
"src/core/lib/iomgr/sockaddr_utils.h",
|
||||
"src/core/lib/iomgr/sockaddr_windows.h",
|
||||
|
|
@ -874,17 +894,17 @@ grpc_cc_library(
|
|||
"src/core/lib/iomgr/sys_epoll_wrapper.h",
|
||||
"src/core/lib/iomgr/tcp_client.h",
|
||||
"src/core/lib/iomgr/tcp_client_posix.h",
|
||||
"src/core/lib/iomgr/tcp_custom.h",
|
||||
"src/core/lib/iomgr/tcp_posix.h",
|
||||
"src/core/lib/iomgr/tcp_server.h",
|
||||
"src/core/lib/iomgr/tcp_server_utils_posix.h",
|
||||
"src/core/lib/iomgr/tcp_uv.h",
|
||||
"src/core/lib/iomgr/tcp_windows.h",
|
||||
"src/core/lib/iomgr/time_averaged_stats.h",
|
||||
"src/core/lib/iomgr/timer.h",
|
||||
"src/core/lib/iomgr/timer_custom.h",
|
||||
"src/core/lib/iomgr/timer_generic.h",
|
||||
"src/core/lib/iomgr/timer_heap.h",
|
||||
"src/core/lib/iomgr/timer_manager.h",
|
||||
"src/core/lib/iomgr/timer_uv.h",
|
||||
"src/core/lib/iomgr/udp_server.h",
|
||||
"src/core/lib/iomgr/unix_sockets_posix.h",
|
||||
"src/core/lib/iomgr/wakeup_fd_cv.h",
|
||||
|
|
@ -939,6 +959,7 @@ grpc_cc_library(
|
|||
"grpc_codegen",
|
||||
"grpc_trace",
|
||||
"inlined_vector",
|
||||
"orphanable",
|
||||
"ref_counted",
|
||||
"ref_counted_ptr",
|
||||
],
|
||||
|
|
@ -964,6 +985,7 @@ grpc_cc_library(
|
|||
# standard plugins
|
||||
"census",
|
||||
"grpc_deadline_filter",
|
||||
"grpc_client_authority_filter",
|
||||
"grpc_lb_policy_pick_first",
|
||||
"grpc_lb_policy_round_robin",
|
||||
"grpc_server_load_reporting",
|
||||
|
|
@ -1002,7 +1024,6 @@ grpc_cc_library(
|
|||
"src/core/ext/filters/client_channel/resolver.cc",
|
||||
"src/core/ext/filters/client_channel/resolver_registry.cc",
|
||||
"src/core/ext/filters/client_channel/retry_throttle.cc",
|
||||
"src/core/ext/filters/client_channel/status_util.cc",
|
||||
"src/core/ext/filters/client_channel/subchannel.cc",
|
||||
"src/core/ext/filters/client_channel/subchannel_index.cc",
|
||||
"src/core/ext/filters/client_channel/uri_parser.cc",
|
||||
|
|
@ -1025,7 +1046,6 @@ grpc_cc_library(
|
|||
"src/core/ext/filters/client_channel/resolver_factory.h",
|
||||
"src/core/ext/filters/client_channel/resolver_registry.h",
|
||||
"src/core/ext/filters/client_channel/retry_throttle.h",
|
||||
"src/core/ext/filters/client_channel/status_util.h",
|
||||
"src/core/ext/filters/client_channel/subchannel.h",
|
||||
"src/core/ext/filters/client_channel/subchannel_index.h",
|
||||
"src/core/ext/filters/client_channel/uri_parser.h",
|
||||
|
|
@ -1034,6 +1054,7 @@ grpc_cc_library(
|
|||
deps = [
|
||||
"gpr_base",
|
||||
"grpc_base",
|
||||
"grpc_client_authority_filter",
|
||||
"grpc_deadline_filter",
|
||||
"inlined_vector",
|
||||
"orphanable",
|
||||
|
|
@ -1070,6 +1091,20 @@ grpc_cc_library(
|
|||
],
|
||||
)
|
||||
|
||||
grpc_cc_library(
|
||||
name = "grpc_client_authority_filter",
|
||||
srcs = [
|
||||
"src/core/ext/filters/http/client_authority_filter.cc",
|
||||
],
|
||||
hdrs = [
|
||||
"src/core/ext/filters/http/client_authority_filter.h",
|
||||
],
|
||||
language = "c++",
|
||||
deps = [
|
||||
"grpc_base",
|
||||
],
|
||||
)
|
||||
|
||||
grpc_cc_library(
|
||||
name = "grpc_message_size_filter",
|
||||
srcs = [
|
||||
|
|
@ -1148,6 +1183,7 @@ grpc_cc_library(
|
|||
],
|
||||
hdrs = [
|
||||
"src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h",
|
||||
"src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h",
|
||||
"src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h",
|
||||
"src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h",
|
||||
"src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h",
|
||||
|
|
@ -1176,6 +1212,7 @@ grpc_cc_library(
|
|||
],
|
||||
hdrs = [
|
||||
"src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h",
|
||||
"src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h",
|
||||
"src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h",
|
||||
"src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h",
|
||||
"src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h",
|
||||
|
|
@ -1195,9 +1232,6 @@ grpc_cc_library(
|
|||
|
||||
grpc_cc_library(
|
||||
name = "grpc_lb_subchannel_list",
|
||||
srcs = [
|
||||
"src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc",
|
||||
],
|
||||
hdrs = [
|
||||
"src/core/ext/filters/client_channel/lb_policy/subchannel_list.h",
|
||||
],
|
||||
|
|
@ -1250,6 +1284,20 @@ grpc_cc_library(
|
|||
],
|
||||
)
|
||||
|
||||
grpc_cc_library(
|
||||
name = "lb_load_data_store",
|
||||
srcs = [
|
||||
"src/cpp/server/load_reporter/load_data_store.cc",
|
||||
],
|
||||
hdrs = [
|
||||
"src/cpp/server/load_reporter/load_data_store.h",
|
||||
],
|
||||
language = "c++",
|
||||
deps = [
|
||||
"grpc++",
|
||||
],
|
||||
)
|
||||
|
||||
grpc_cc_library(
|
||||
name = "grpc_resolver_dns_native",
|
||||
srcs = [
|
||||
|
|
@ -1276,6 +1324,7 @@ grpc_cc_library(
|
|||
],
|
||||
external_deps = [
|
||||
"cares",
|
||||
"address_sorting",
|
||||
],
|
||||
language = "c++",
|
||||
deps = [
|
||||
|
|
@ -1313,6 +1362,7 @@ grpc_cc_library(
|
|||
srcs = [
|
||||
"src/core/lib/http/httpcli_security_connector.cc",
|
||||
"src/core/lib/security/context/security_context.cc",
|
||||
"src/core/lib/security/credentials/alts/alts_credentials.cc",
|
||||
"src/core/lib/security/credentials/composite/composite_credentials.cc",
|
||||
"src/core/lib/security/credentials/credentials.cc",
|
||||
"src/core/lib/security/credentials/credentials_metadata.cc",
|
||||
|
|
@ -1326,7 +1376,6 @@ grpc_cc_library(
|
|||
"src/core/lib/security/credentials/oauth2/oauth2_credentials.cc",
|
||||
"src/core/lib/security/credentials/plugin/plugin_credentials.cc",
|
||||
"src/core/lib/security/credentials/ssl/ssl_credentials.cc",
|
||||
"src/core/lib/security/credentials/alts/alts_credentials.cc",
|
||||
"src/core/lib/security/security_connector/alts_security_connector.cc",
|
||||
"src/core/lib/security/security_connector/security_connector.cc",
|
||||
"src/core/lib/security/transport/client_auth_filter.cc",
|
||||
|
|
@ -1339,7 +1388,9 @@ grpc_cc_library(
|
|||
"src/core/lib/surface/init_secure.cc",
|
||||
],
|
||||
hdrs = [
|
||||
"src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h",
|
||||
"src/core/lib/security/context/security_context.h",
|
||||
"src/core/lib/security/credentials/alts/alts_credentials.h",
|
||||
"src/core/lib/security/credentials/composite/composite_credentials.h",
|
||||
"src/core/lib/security/credentials/credentials.h",
|
||||
"src/core/lib/security/credentials/fake/fake_credentials.h",
|
||||
|
|
@ -1351,7 +1402,6 @@ grpc_cc_library(
|
|||
"src/core/lib/security/credentials/oauth2/oauth2_credentials.h",
|
||||
"src/core/lib/security/credentials/plugin/plugin_credentials.h",
|
||||
"src/core/lib/security/credentials/ssl/ssl_credentials.h",
|
||||
"src/core/lib/security/credentials/alts/alts_credentials.h",
|
||||
"src/core/lib/security/security_connector/alts_security_connector.h",
|
||||
"src/core/lib/security/security_connector/security_connector.h",
|
||||
"src/core/lib/security/transport/auth_filters.h",
|
||||
|
|
@ -1445,9 +1495,11 @@ grpc_cc_library(
|
|||
grpc_cc_library(
|
||||
name = "grpc_transport_chttp2_client_connector",
|
||||
srcs = [
|
||||
"src/core/ext/transport/chttp2/client/authority.cc",
|
||||
"src/core/ext/transport/chttp2/client/chttp2_connector.cc",
|
||||
],
|
||||
hdrs = [
|
||||
"src/core/ext/transport/chttp2/client/authority.h",
|
||||
"src/core/ext/transport/chttp2/client/chttp2_connector.h",
|
||||
],
|
||||
language = "c++",
|
||||
|
|
@ -1573,11 +1625,9 @@ grpc_cc_library(
|
|||
name = "tsi_interface",
|
||||
srcs = [
|
||||
"src/core/tsi/transport_security.cc",
|
||||
"src/core/tsi/transport_security_adapter.cc",
|
||||
],
|
||||
hdrs = [
|
||||
"src/core/tsi/transport_security.h",
|
||||
"src/core/tsi/transport_security_adapter.h",
|
||||
"src/core/tsi/transport_security_interface.h",
|
||||
],
|
||||
language = "c++",
|
||||
|
|
@ -1614,8 +1664,8 @@ grpc_cc_library(
|
|||
"src/core/tsi/alts/frame_protector/frame_handler.h",
|
||||
"src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.h",
|
||||
"src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.h",
|
||||
"src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.h",
|
||||
"src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol.h",
|
||||
"src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.h",
|
||||
"src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h",
|
||||
"src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h",
|
||||
"src/core/tsi/transport_security_grpc.h",
|
||||
|
|
@ -1670,37 +1720,43 @@ grpc_cc_library(
|
|||
"src/core/tsi/alts/handshaker/alts_handshaker_service_api_util.h",
|
||||
"src/core/tsi/alts/handshaker/transport_security_common_api.h",
|
||||
],
|
||||
public_hdrs = GRPC_SECURE_PUBLIC_HDRS,
|
||||
external_deps = [
|
||||
"nanopb",
|
||||
],
|
||||
language = "c++",
|
||||
deps = [
|
||||
"alts_proto",
|
||||
"gpr",
|
||||
"grpc_base",
|
||||
"alts_proto",
|
||||
"gpr",
|
||||
"grpc_base",
|
||||
],
|
||||
)
|
||||
|
||||
grpc_cc_library(
|
||||
name = "tsi",
|
||||
srcs = [
|
||||
"src/core/tsi/alts_transport_security.cc",
|
||||
"src/core/tsi/alts/handshaker/alts_handshaker_client.cc",
|
||||
"src/core/tsi/alts/handshaker/alts_tsi_event.cc",
|
||||
"src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc",
|
||||
"src/core/tsi/alts/handshaker/alts_tsi_utils.cc",
|
||||
"src/core/tsi/alts_transport_security.cc",
|
||||
"src/core/tsi/fake_transport_security.cc",
|
||||
"src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc",
|
||||
"src/core/tsi/ssl/session_cache/ssl_session_cache.cc",
|
||||
"src/core/tsi/ssl/session_cache/ssl_session_openssl.cc",
|
||||
"src/core/tsi/ssl_transport_security.cc",
|
||||
"src/core/tsi/transport_security_grpc.cc",
|
||||
],
|
||||
hdrs = [
|
||||
"src/core/tsi/alts_transport_security.h",
|
||||
"src/core/tsi/alts/handshaker/alts_handshaker_client.h",
|
||||
"src/core/tsi/alts/handshaker/alts_tsi_event.h",
|
||||
"src/core/tsi/alts/handshaker/alts_tsi_handshaker.h",
|
||||
"src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h",
|
||||
"src/core/tsi/alts/handshaker/alts_tsi_utils.h",
|
||||
"src/core/tsi/alts_transport_security.h",
|
||||
"src/core/tsi/fake_transport_security.h",
|
||||
"src/core/tsi/ssl/session_cache/ssl_session.h",
|
||||
"src/core/tsi/ssl/session_cache/ssl_session_cache.h",
|
||||
"src/core/tsi/ssl_transport_security.h",
|
||||
"src/core/tsi/ssl_types.h",
|
||||
"src/core/tsi/transport_security_grpc.h",
|
||||
|
|
@ -1829,6 +1885,8 @@ grpc_cc_library(
|
|||
language = "c++",
|
||||
public_hdrs = [
|
||||
"include/grpc++/impl/codegen/proto_utils.h",
|
||||
"include/grpcpp/impl/codegen/proto_buffer_reader.h",
|
||||
"include/grpcpp/impl/codegen/proto_buffer_writer.h",
|
||||
"include/grpcpp/impl/codegen/proto_utils.h",
|
||||
],
|
||||
deps = [
|
||||
|
|
|
|||
1251
CMakeLists.txt
1251
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
21
INSTALL.md
21
INSTALL.md
|
|
@ -39,8 +39,8 @@ and then run the following command from a terminal:
|
|||
$ [sudo] xcode-select --install
|
||||
```
|
||||
|
||||
To build gRPC from source, you may also need to install the following
|
||||
packages, which you can get from [Homebrew](https://brew.sh):
|
||||
To build gRPC from source, you may need to install the following
|
||||
packages from [Homebrew](https://brew.sh):
|
||||
|
||||
```sh
|
||||
$ brew install autoconf automake libtool shtool
|
||||
|
|
@ -66,11 +66,11 @@ By default gRPC uses [protocol buffers](https://github.com/google/protobuf),
|
|||
you will need the `protoc` compiler to generate stub server and client code.
|
||||
|
||||
If you compile gRPC from source, as described below, the Makefile will
|
||||
automatically try and compile the `protoc` in third_party if you cloned the
|
||||
repository recursively and it detects that you don't already have it
|
||||
automatically try compiling the `protoc` in third_party if you cloned the
|
||||
repository recursively and it detects that you do not already have 'protoc' compiler
|
||||
installed.
|
||||
|
||||
If it hasn't been installed, you can run the following commands to install it.
|
||||
If 'protoc' compiler has not been installed, following commands can be used for installation.
|
||||
|
||||
```sh
|
||||
$ cd grpc/third_party/protobuf
|
||||
|
|
@ -79,7 +79,7 @@ $ sudo make install # 'make' should have been run by core grpc
|
|||
|
||||
# Build from Source
|
||||
|
||||
For developers who are interested to contribute, here is how to compile the
|
||||
For developers who are interested to contribute, the following commands show how to compile the
|
||||
gRPC C Core library.
|
||||
|
||||
```sh
|
||||
|
|
@ -123,7 +123,7 @@ When using the "Visual Studio" generator,
|
|||
cmake will generate a solution (`grpc.sln`) that contains a VS project for
|
||||
every target defined in `CMakeLists.txt` (+ few extra convenience projects
|
||||
added automatically by cmake). After opening the solution with Visual Studio
|
||||
you will be able to browse and build the code as usual.
|
||||
you will be able to browse and build the code.
|
||||
```
|
||||
> @rem Run from grpc directory after cloning the repo with --recursive or updating submodules.
|
||||
> md .build
|
||||
|
|
@ -133,7 +133,7 @@ you will be able to browse and build the code as usual.
|
|||
```
|
||||
|
||||
#### cmake: Using Ninja (faster build, supports boringssl's assembly optimizations).
|
||||
Please note that when using Ninja, you'll still need Visual C++ (part of Visual Studio)
|
||||
Please note that when using Ninja, you will still need Visual C++ (part of Visual Studio)
|
||||
installed to be able to compile the C/C++ sources.
|
||||
```
|
||||
> @rem Run from grpc directory after cloning the repo with --recursive or updating submodules.
|
||||
|
|
@ -142,13 +142,12 @@ installed to be able to compile the C/C++ sources.
|
|||
> call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x64
|
||||
> cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release
|
||||
> cmake --build .
|
||||
> ninja
|
||||
```
|
||||
|
||||
### msys2 (with mingw)
|
||||
|
||||
The Makefile (and source code) should support msys2's mingw32 and mingw64
|
||||
compilers. Building with msys2's native compiler is also possible, but
|
||||
compilers. Building with msys2's native compiler is possible, but
|
||||
difficult.
|
||||
|
||||
This approach requires having [msys2](https://msys2.github.io/) installed.
|
||||
|
|
@ -165,7 +164,7 @@ MINGW64$ export CPPFLAGS="-D_WIN32_WINNT=0x0600"
|
|||
MINGW64$ make
|
||||
```
|
||||
|
||||
NOTE: While most of the make targets are buildable under Mingw, some haven't been ported to Windows yet
|
||||
NOTE: Though most of the make targets are buildable under Mingw, some haven't been ported to Windows yet
|
||||
and may fail to build (mostly trying to include POSIX headers not available on Mingw).
|
||||
|
||||
### Pre-generated Visual Studio solution (DELETED)
|
||||
|
|
|
|||
|
|
@ -3,10 +3,6 @@
|
|||
## Bazel
|
||||
* [grpc.bzl](grpc.bzl)
|
||||
|
||||
## Node
|
||||
* [binding.gyp](binding.gyp)
|
||||
* [package.json](package.json)
|
||||
|
||||
## Objective-C
|
||||
* [gRPC.podspec](gRPC.podspec)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,11 @@ graft src/python/grpcio/grpcio.egg-info
|
|||
graft src/core
|
||||
graft src/boringssl
|
||||
graft include/grpc
|
||||
graft third_party/address_sorting
|
||||
graft third_party/boringssl
|
||||
graft third_party/cares
|
||||
graft third_party/nanopb
|
||||
graft third_party/zlib
|
||||
graft third_party/cares
|
||||
include src/python/grpcio/_spawn_patch.py
|
||||
include src/python/grpcio/commands.py
|
||||
include src/python/grpcio/grpc_version.py
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ Libraries in different languages may be in different states of development. We a
|
|||
| Java | [grpc-java](http://github.com/grpc/grpc-java) |
|
||||
| Go | [grpc-go](http://github.com/grpc/grpc-go) |
|
||||
| NodeJS | [grpc-node](https://github.com/grpc/grpc-node) |
|
||||
| WebJS | [grpc-web](https://github.com/grpc/grpc-web) |
|
||||
| Dart | [grpc-dart](https://github.com/grpc/grpc-dart) |
|
||||
|
||||
See [MANIFEST.md](MANIFEST.md) for a listing of top-level items in the
|
||||
|
|
|
|||
6
Rakefile
6
Rakefile
|
|
@ -23,6 +23,12 @@ end
|
|||
|
||||
# Add the extension compiler task
|
||||
Rake::ExtensionTask.new('grpc_c', spec) do |ext|
|
||||
unless RUBY_PLATFORM =~ /darwin/
|
||||
# TODO: also set "no_native to true" for mac if possible. As is,
|
||||
# "no_native" can only be set if the RUBY_PLATFORM doing
|
||||
# cross-compilation is contained in the "ext.cross_platform" array.
|
||||
ext.no_native = true
|
||||
end
|
||||
ext.source_pattern = '**/*.{c,h}'
|
||||
ext.ext_dir = File.join('src', 'ruby', 'ext', 'grpc')
|
||||
ext.lib_dir = File.join('src', 'ruby', 'lib', 'grpc')
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
load("//:bazel/generate_cc.bzl", "generate_cc")
|
||||
|
||||
def cc_grpc_library(name, srcs, deps, proto_only, well_known_protos, generate_mock, use_external = False, **kwargs):
|
||||
def cc_grpc_library(name, srcs, deps, proto_only, well_known_protos, generate_mocks = False, use_external = False, **kwargs):
|
||||
"""Generates C++ grpc classes from a .proto file.
|
||||
|
||||
Assumes the generated classes will be used in cc_api_version = 2.
|
||||
|
|
@ -16,7 +16,7 @@ def cc_grpc_library(name, srcs, deps, proto_only, well_known_protos, generate_mo
|
|||
protos
|
||||
use_external: When True the grpc deps are prefixed with //external. This
|
||||
allows grpc to be used as a dependency in other bazel projects.
|
||||
generate_mock: When true GMOCk code for client stub is generated.
|
||||
generate_mocks: When True, Google Mock code for client stub is generated.
|
||||
**kwargs: rest of arguments, e.g., compatible_with and visibility.
|
||||
"""
|
||||
if len(srcs) > 1:
|
||||
|
|
@ -54,7 +54,7 @@ def cc_grpc_library(name, srcs, deps, proto_only, well_known_protos, generate_mo
|
|||
srcs = [proto_target],
|
||||
plugin = plugin,
|
||||
well_known_protos = well_known_protos,
|
||||
generate_mock = generate_mock,
|
||||
generate_mocks = generate_mocks,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -10,30 +10,52 @@ def generate_cc_impl(ctx):
|
|||
includes = [f for src in ctx.attr.srcs for f in src.proto.transitive_imports]
|
||||
outs = []
|
||||
# label_len is length of the path from WORKSPACE root to the location of this build file
|
||||
label_len = len(ctx.label.package) + 1
|
||||
label_len = 0
|
||||
# proto_root is the directory relative to which generated include paths should be
|
||||
proto_root = ""
|
||||
if ctx.label.package:
|
||||
# The +1 is for the trailing slash.
|
||||
label_len += len(ctx.label.package) + 1
|
||||
if ctx.label.workspace_root:
|
||||
label_len += len(ctx.label.workspace_root) + 1
|
||||
proto_root = "/" + ctx.label.workspace_root
|
||||
|
||||
if ctx.executable.plugin:
|
||||
outs += [proto.path[label_len:-len(".proto")] + ".grpc.pb.h" for proto in protos]
|
||||
outs += [proto.path[label_len:-len(".proto")] + ".grpc.pb.cc" for proto in protos]
|
||||
if ctx.attr.generate_mock:
|
||||
if ctx.attr.generate_mocks:
|
||||
outs += [proto.path[label_len:-len(".proto")] + "_mock.grpc.pb.h" for proto in protos]
|
||||
else:
|
||||
outs += [proto.path[label_len:-len(".proto")] + ".pb.h" for proto in protos]
|
||||
outs += [proto.path[label_len:-len(".proto")] + ".pb.cc" for proto in protos]
|
||||
out_files = [ctx.new_file(out) for out in outs]
|
||||
dir_out = str(ctx.genfiles_dir.path)
|
||||
dir_out = str(ctx.genfiles_dir.path + proto_root)
|
||||
|
||||
arguments = []
|
||||
if ctx.executable.plugin:
|
||||
arguments += ["--plugin=protoc-gen-PLUGIN=" + ctx.executable.plugin.path]
|
||||
flags = list(ctx.attr.flags)
|
||||
if ctx.attr.generate_mock:
|
||||
if ctx.attr.generate_mocks:
|
||||
flags.append("generate_mock_code=true")
|
||||
arguments += ["--PLUGIN_out=" + ",".join(flags) + ":" + dir_out]
|
||||
additional_input = [ctx.executable.plugin]
|
||||
else:
|
||||
arguments += ["--cpp_out=" + ",".join(ctx.attr.flags) + ":" + dir_out]
|
||||
additional_input = []
|
||||
arguments += ["-I{0}={0}".format(include.path) for include in includes]
|
||||
|
||||
# Import protos relative to their workspace root so that protoc prints the
|
||||
# right include paths.
|
||||
for include in includes:
|
||||
directory = include.path
|
||||
if directory.startswith("external"):
|
||||
external_sep = directory.find("/")
|
||||
repository_sep = directory.find("/", external_sep + 1)
|
||||
arguments += ["--proto_path=" + directory[:repository_sep]]
|
||||
else:
|
||||
arguments += ["--proto_path=."]
|
||||
# Include the output directory so that protoc puts the generated code in the
|
||||
# right directory.
|
||||
arguments += ["--proto_path={0}{1}".format(dir_out, proto_root)]
|
||||
arguments += [proto.path for proto in protos]
|
||||
|
||||
# create a list of well known proto files if the argument is non-None
|
||||
|
|
@ -76,7 +98,7 @@ _generate_cc = rule(
|
|||
"well_known_protos" : attr.label(
|
||||
mandatory = False,
|
||||
),
|
||||
"generate_mock" : attr.bool(
|
||||
"generate_mocks" : attr.bool(
|
||||
default = False,
|
||||
mandatory = False,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -37,7 +37,9 @@ def _get_external_deps(external_deps):
|
|||
ret = []
|
||||
for dep in external_deps:
|
||||
if dep == "nanopb":
|
||||
ret += ["//third_party/nanopb"]
|
||||
ret += ["grpc_nanopb"]
|
||||
elif dep == "address_sorting":
|
||||
ret += ["//third_party/address_sorting"]
|
||||
elif dep == "cares":
|
||||
ret += select({"//:grpc_no_ares": [],
|
||||
"//conditions:default": ["//external:cares"],})
|
||||
|
|
@ -57,12 +59,6 @@ def _maybe_update_cc_library_hdrs(hdrs):
|
|||
ret.append(h)
|
||||
return ret
|
||||
|
||||
def _maybe_update_cc_library_defines(name):
|
||||
ret = []
|
||||
if name == "alts_proto":
|
||||
ret += ["PB_FIELD_16BIT=1"]
|
||||
return ret
|
||||
|
||||
def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [],
|
||||
external_deps = [], deps = [], standalone = False,
|
||||
language = "C++", testonly = False, visibility = None,
|
||||
|
|
@ -70,11 +66,10 @@ def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [],
|
|||
copts = []
|
||||
if language.upper() == "C":
|
||||
copts = if_not_windows(["-std=c99"])
|
||||
defines = _maybe_update_cc_library_defines(name)
|
||||
native.cc_library(
|
||||
name = name,
|
||||
srcs = srcs,
|
||||
defines = defines + select({"//:grpc_no_ares": ["GRPC_ARES=0"],
|
||||
defines = select({"//:grpc_no_ares": ["GRPC_ARES=0"],
|
||||
"//conditions:default": [],}) +
|
||||
select({"//:remote_execution": ["GRPC_PORT_ISOLATED_RUNTIME=1"],
|
||||
"//conditions:default": [],}) +
|
||||
|
|
@ -104,7 +99,7 @@ def grpc_proto_plugin(name, srcs = [], deps = []):
|
|||
load("//:bazel/cc_grpc_library.bzl", "cc_grpc_library")
|
||||
|
||||
def grpc_proto_library(name, srcs = [], deps = [], well_known_protos = False,
|
||||
has_services = True, use_external = False, generate_mock = False):
|
||||
has_services = True, use_external = False, generate_mocks = False):
|
||||
cc_grpc_library(
|
||||
name = name,
|
||||
srcs = srcs,
|
||||
|
|
@ -112,10 +107,10 @@ def grpc_proto_library(name, srcs = [], deps = [], well_known_protos = False,
|
|||
well_known_protos = well_known_protos,
|
||||
proto_only = not has_services,
|
||||
use_external = use_external,
|
||||
generate_mock = generate_mock,
|
||||
generate_mocks = generate_mocks,
|
||||
)
|
||||
|
||||
def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data = [], uses_polling = True, language = "C++"):
|
||||
def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data = [], uses_polling = True, language = "C++", size = "medium", timeout = "moderate"):
|
||||
copts = []
|
||||
if language.upper() == "C":
|
||||
copts = if_not_windows(["-std=c99"])
|
||||
|
|
@ -127,6 +122,8 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data
|
|||
'deps': deps + _get_external_deps(external_deps),
|
||||
'copts': copts,
|
||||
'linkopts': if_not_windows(["-pthread"]),
|
||||
'size': size,
|
||||
'timeout': timeout,
|
||||
}
|
||||
if uses_polling:
|
||||
native.cc_test(testonly=True, tags=['manual'], **args)
|
||||
|
|
@ -137,9 +134,11 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data
|
|||
srcs = [
|
||||
'//test/core/util:run_with_poller_sh',
|
||||
],
|
||||
size = size,
|
||||
timeout = timeout,
|
||||
args = [
|
||||
poller,
|
||||
'$(location %s)' % name
|
||||
'$(location %s)' % name,
|
||||
] + args['args'],
|
||||
)
|
||||
else:
|
||||
|
|
@ -162,7 +161,23 @@ def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], da
|
|||
)
|
||||
|
||||
def grpc_generate_one_off_targets():
|
||||
pass
|
||||
native.cc_library(
|
||||
name = "grpc_nanopb",
|
||||
hdrs = [
|
||||
"//third_party/nanopb:pb.h",
|
||||
"//third_party/nanopb:pb_common.h",
|
||||
"//third_party/nanopb:pb_decode.h",
|
||||
"//third_party/nanopb:pb_encode.h",
|
||||
],
|
||||
srcs = [
|
||||
"//third_party/nanopb:pb_common.c",
|
||||
"//third_party/nanopb:pb_decode.c",
|
||||
"//third_party/nanopb:pb_encode.c",
|
||||
],
|
||||
defines = [
|
||||
"PB_FIELD_16BIT=1",
|
||||
],
|
||||
)
|
||||
|
||||
def grpc_sh_test(name, srcs, args = [], data = []):
|
||||
native.sh_test(
|
||||
|
|
@ -181,6 +196,7 @@ def grpc_py_binary(name, srcs, data = [], deps = [], external_deps = [], testonl
|
|||
native.py_binary(
|
||||
name = name,
|
||||
srcs = srcs,
|
||||
testonly = testonly,
|
||||
data = data,
|
||||
deps = deps + _get_external_deps(external_deps)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -57,6 +57,16 @@ def grpc_deps():
|
|||
actual = "@com_github_gflags_gflags//:gflags",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "grpc_cpp_plugin",
|
||||
actual = "@com_github_grpc_grpc//:grpc_cpp_plugin"
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "grpc++_codegen_proto",
|
||||
actual = "@com_github_grpc_grpc//:grpc++_codegen_proto"
|
||||
)
|
||||
|
||||
if "boringssl" not in native.existing_rules():
|
||||
native.http_archive(
|
||||
name = "boringssl",
|
||||
|
|
@ -75,8 +85,8 @@ def grpc_deps():
|
|||
if "com_google_protobuf" not in native.existing_rules():
|
||||
native.http_archive(
|
||||
name = "com_google_protobuf",
|
||||
strip_prefix = "protobuf-2761122b810fe8861004ae785cc3ab39f384d342",
|
||||
url = "https://github.com/google/protobuf/archive/2761122b810fe8861004ae785cc3ab39f384d342.tar.gz",
|
||||
strip_prefix = "protobuf-b5fbb742af122b565925987e65c08957739976a7",
|
||||
url = "https://github.com/google/protobuf/archive/b5fbb742af122b565925987e65c08957739976a7.tar.gz",
|
||||
)
|
||||
|
||||
if "com_github_google_googletest" not in native.existing_rules():
|
||||
|
|
@ -120,12 +130,12 @@ def grpc_deps():
|
|||
if "com_github_bazelbuild_bazeltoolchains" not in native.existing_rules():
|
||||
native.http_archive(
|
||||
name = "com_github_bazelbuild_bazeltoolchains",
|
||||
strip_prefix = "bazel-toolchains-b850ccdf53fed1ccab7670f52d6b297d74348d1b",
|
||||
strip_prefix = "bazel-toolchains-44200e0c026d86c53470d107b3697a3e46469c43",
|
||||
urls = [
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/b850ccdf53fed1ccab7670f52d6b297d74348d1b.tar.gz",
|
||||
"https://github.com/bazelbuild/bazel-toolchains/archive/b850ccdf53fed1ccab7670f52d6b297d74348d1b.tar.gz",
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/44200e0c026d86c53470d107b3697a3e46469c43.tar.gz",
|
||||
"https://github.com/bazelbuild/bazel-toolchains/archive/44200e0c026d86c53470d107b3697a3e46469c43.tar.gz",
|
||||
],
|
||||
sha256 = "d84d6b2fe88ef99963febf91ddce33503eed14c155ace922e2122271b483be64",
|
||||
sha256 = "699b55a6916c687f4b7dc092dbbf5f64672cde0dc965f79717735ec4e5416556",
|
||||
)
|
||||
|
||||
# TODO: move some dependencies from "grpc_deps" here?
|
||||
|
|
|
|||
273
build.yaml
273
build.yaml
|
|
@ -13,8 +13,8 @@ settings:
|
|||
'#09': Per-language overrides are possible with (eg) ruby_version tag here
|
||||
'#10': See the expand_version.py for all the quirks here
|
||||
core_version: 6.0.0-dev
|
||||
g_stands_for: gorgeous
|
||||
version: 1.11.0-dev
|
||||
g_stands_for: gloriosa
|
||||
version: 1.13.0-dev
|
||||
filegroups:
|
||||
- name: alts_proto
|
||||
headers:
|
||||
|
|
@ -70,6 +70,8 @@ filegroups:
|
|||
- tsi_interface
|
||||
- tsi
|
||||
- name: alts_util
|
||||
public_headers:
|
||||
- include/grpc/grpc_security.h
|
||||
headers:
|
||||
- src/core/lib/security/credentials/alts/check_gcp_environment.h
|
||||
- src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h
|
||||
|
|
@ -232,10 +234,13 @@ filegroups:
|
|||
- src/core/lib/channel/channel_args.cc
|
||||
- src/core/lib/channel/channel_stack.cc
|
||||
- src/core/lib/channel/channel_stack_builder.cc
|
||||
- src/core/lib/channel/channel_trace.cc
|
||||
- src/core/lib/channel/channel_trace_registry.cc
|
||||
- src/core/lib/channel/connected_channel.cc
|
||||
- src/core/lib/channel/handshaker.cc
|
||||
- src/core/lib/channel/handshaker_factory.cc
|
||||
- src/core/lib/channel/handshaker_registry.cc
|
||||
- src/core/lib/channel/status_util.cc
|
||||
- src/core/lib/compression/compression.cc
|
||||
- src/core/lib/compression/compression_internal.cc
|
||||
- src/core/lib/compression/message_compress.cc
|
||||
|
|
@ -269,6 +274,8 @@ filegroups:
|
|||
- src/core/lib/iomgr/gethostname_sysconf.cc
|
||||
- src/core/lib/iomgr/iocp_windows.cc
|
||||
- src/core/lib/iomgr/iomgr.cc
|
||||
- src/core/lib/iomgr/iomgr_custom.cc
|
||||
- src/core/lib/iomgr/iomgr_internal.cc
|
||||
- src/core/lib/iomgr/iomgr_posix.cc
|
||||
- src/core/lib/iomgr/iomgr_uv.cc
|
||||
- src/core/lib/iomgr/iomgr_windows.cc
|
||||
|
|
@ -277,12 +284,16 @@ filegroups:
|
|||
- src/core/lib/iomgr/lockfree_event.cc
|
||||
- src/core/lib/iomgr/network_status_tracker.cc
|
||||
- src/core/lib/iomgr/polling_entity.cc
|
||||
- src/core/lib/iomgr/pollset_set_uv.cc
|
||||
- src/core/lib/iomgr/pollset.cc
|
||||
- src/core/lib/iomgr/pollset_custom.cc
|
||||
- src/core/lib/iomgr/pollset_set.cc
|
||||
- src/core/lib/iomgr/pollset_set_custom.cc
|
||||
- src/core/lib/iomgr/pollset_set_windows.cc
|
||||
- src/core/lib/iomgr/pollset_uv.cc
|
||||
- src/core/lib/iomgr/pollset_windows.cc
|
||||
- src/core/lib/iomgr/resolve_address.cc
|
||||
- src/core/lib/iomgr/resolve_address_custom.cc
|
||||
- src/core/lib/iomgr/resolve_address_posix.cc
|
||||
- src/core/lib/iomgr/resolve_address_uv.cc
|
||||
- src/core/lib/iomgr/resolve_address_windows.cc
|
||||
- src/core/lib/iomgr/resource_quota.cc
|
||||
- src/core/lib/iomgr/sockaddr_utils.cc
|
||||
|
|
@ -294,19 +305,24 @@ filegroups:
|
|||
- src/core/lib/iomgr/socket_utils_uv.cc
|
||||
- src/core/lib/iomgr/socket_utils_windows.cc
|
||||
- src/core/lib/iomgr/socket_windows.cc
|
||||
- src/core/lib/iomgr/tcp_client.cc
|
||||
- src/core/lib/iomgr/tcp_client_custom.cc
|
||||
- src/core/lib/iomgr/tcp_client_posix.cc
|
||||
- src/core/lib/iomgr/tcp_client_uv.cc
|
||||
- src/core/lib/iomgr/tcp_client_windows.cc
|
||||
- src/core/lib/iomgr/tcp_custom.cc
|
||||
- src/core/lib/iomgr/tcp_posix.cc
|
||||
- src/core/lib/iomgr/tcp_server.cc
|
||||
- src/core/lib/iomgr/tcp_server_custom.cc
|
||||
- src/core/lib/iomgr/tcp_server_posix.cc
|
||||
- src/core/lib/iomgr/tcp_server_utils_posix_common.cc
|
||||
- src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
|
||||
- src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
|
||||
- src/core/lib/iomgr/tcp_server_uv.cc
|
||||
- src/core/lib/iomgr/tcp_server_windows.cc
|
||||
- src/core/lib/iomgr/tcp_uv.cc
|
||||
- src/core/lib/iomgr/tcp_windows.cc
|
||||
- src/core/lib/iomgr/time_averaged_stats.cc
|
||||
- src/core/lib/iomgr/timer.cc
|
||||
- src/core/lib/iomgr/timer_custom.cc
|
||||
- src/core/lib/iomgr/timer_generic.cc
|
||||
- src/core/lib/iomgr/timer_heap.cc
|
||||
- src/core/lib/iomgr/timer_manager.cc
|
||||
|
|
@ -388,11 +404,14 @@ filegroups:
|
|||
- src/core/lib/channel/channel_args.h
|
||||
- src/core/lib/channel/channel_stack.h
|
||||
- src/core/lib/channel/channel_stack_builder.h
|
||||
- src/core/lib/channel/channel_trace.h
|
||||
- src/core/lib/channel/channel_trace_registry.h
|
||||
- src/core/lib/channel/connected_channel.h
|
||||
- src/core/lib/channel/context.h
|
||||
- src/core/lib/channel/handshaker.h
|
||||
- src/core/lib/channel/handshaker_factory.h
|
||||
- src/core/lib/channel/handshaker_registry.h
|
||||
- src/core/lib/channel/status_util.h
|
||||
- src/core/lib/compression/algorithm_metadata.h
|
||||
- src/core/lib/compression/compression_internal.h
|
||||
- src/core/lib/compression/message_compress.h
|
||||
|
|
@ -427,9 +446,9 @@ filegroups:
|
|||
- src/core/lib/iomgr/gethostname.h
|
||||
- src/core/lib/iomgr/iocp_windows.h
|
||||
- src/core/lib/iomgr/iomgr.h
|
||||
- src/core/lib/iomgr/iomgr_custom.h
|
||||
- src/core/lib/iomgr/iomgr_internal.h
|
||||
- src/core/lib/iomgr/iomgr_posix.h
|
||||
- src/core/lib/iomgr/iomgr_uv.h
|
||||
- src/core/lib/iomgr/is_epollexclusive_available.h
|
||||
- src/core/lib/iomgr/load_file.h
|
||||
- src/core/lib/iomgr/lockfree_event.h
|
||||
|
|
@ -437,14 +456,17 @@ filegroups:
|
|||
- src/core/lib/iomgr/network_status_tracker.h
|
||||
- src/core/lib/iomgr/polling_entity.h
|
||||
- src/core/lib/iomgr/pollset.h
|
||||
- src/core/lib/iomgr/pollset_custom.h
|
||||
- src/core/lib/iomgr/pollset_set.h
|
||||
- src/core/lib/iomgr/pollset_set_custom.h
|
||||
- src/core/lib/iomgr/pollset_set_windows.h
|
||||
- src/core/lib/iomgr/pollset_uv.h
|
||||
- src/core/lib/iomgr/pollset_windows.h
|
||||
- src/core/lib/iomgr/port.h
|
||||
- src/core/lib/iomgr/resolve_address.h
|
||||
- src/core/lib/iomgr/resolve_address_custom.h
|
||||
- src/core/lib/iomgr/resource_quota.h
|
||||
- src/core/lib/iomgr/sockaddr.h
|
||||
- src/core/lib/iomgr/sockaddr_custom.h
|
||||
- src/core/lib/iomgr/sockaddr_posix.h
|
||||
- src/core/lib/iomgr/sockaddr_utils.h
|
||||
- src/core/lib/iomgr/sockaddr_windows.h
|
||||
|
|
@ -456,17 +478,16 @@ filegroups:
|
|||
- src/core/lib/iomgr/sys_epoll_wrapper.h
|
||||
- src/core/lib/iomgr/tcp_client.h
|
||||
- src/core/lib/iomgr/tcp_client_posix.h
|
||||
- src/core/lib/iomgr/tcp_custom.h
|
||||
- src/core/lib/iomgr/tcp_posix.h
|
||||
- src/core/lib/iomgr/tcp_server.h
|
||||
- src/core/lib/iomgr/tcp_server_utils_posix.h
|
||||
- src/core/lib/iomgr/tcp_uv.h
|
||||
- src/core/lib/iomgr/tcp_windows.h
|
||||
- src/core/lib/iomgr/time_averaged_stats.h
|
||||
- src/core/lib/iomgr/timer.h
|
||||
- src/core/lib/iomgr/timer_generic.h
|
||||
- src/core/lib/iomgr/timer_custom.h
|
||||
- src/core/lib/iomgr/timer_heap.h
|
||||
- src/core/lib/iomgr/timer_manager.h
|
||||
- src/core/lib/iomgr/timer_uv.h
|
||||
- src/core/lib/iomgr/udp_server.h
|
||||
- src/core/lib/iomgr/unix_sockets_posix.h
|
||||
- src/core/lib/iomgr/wakeup_fd_cv.h
|
||||
|
|
@ -515,6 +536,14 @@ filegroups:
|
|||
uses:
|
||||
- grpc_codegen
|
||||
- grpc_trace_headers
|
||||
- name: grpc_client_authority_filter
|
||||
headers:
|
||||
- src/core/ext/filters/http/client_authority_filter.h
|
||||
src:
|
||||
- src/core/ext/filters/http/client_authority_filter.cc
|
||||
plugin: grpc_client_authority_filter
|
||||
uses:
|
||||
- grpc_base
|
||||
- name: grpc_client_channel
|
||||
headers:
|
||||
- src/core/ext/filters/client_channel/backup_poller.h
|
||||
|
|
@ -534,7 +563,6 @@ filegroups:
|
|||
- src/core/ext/filters/client_channel/resolver_factory.h
|
||||
- src/core/ext/filters/client_channel/resolver_registry.h
|
||||
- src/core/ext/filters/client_channel/retry_throttle.h
|
||||
- src/core/ext/filters/client_channel/status_util.h
|
||||
- src/core/ext/filters/client_channel/subchannel.h
|
||||
- src/core/ext/filters/client_channel/subchannel_index.h
|
||||
- src/core/ext/filters/client_channel/uri_parser.h
|
||||
|
|
@ -557,7 +585,6 @@ filegroups:
|
|||
- src/core/ext/filters/client_channel/resolver.cc
|
||||
- src/core/ext/filters/client_channel/resolver_registry.cc
|
||||
- src/core/ext/filters/client_channel/retry_throttle.cc
|
||||
- src/core/ext/filters/client_channel/status_util.cc
|
||||
- src/core/ext/filters/client_channel/subchannel.cc
|
||||
- src/core/ext/filters/client_channel/subchannel_index.cc
|
||||
- src/core/ext/filters/client_channel/uri_parser.cc
|
||||
|
|
@ -601,6 +628,7 @@ filegroups:
|
|||
- name: grpc_lb_policy_grpclb
|
||||
headers:
|
||||
- src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h
|
||||
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h
|
||||
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h
|
||||
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h
|
||||
- src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h
|
||||
|
|
@ -621,6 +649,7 @@ filegroups:
|
|||
- name: grpc_lb_policy_grpclb_secure
|
||||
headers:
|
||||
- src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h
|
||||
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h
|
||||
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h
|
||||
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h
|
||||
- src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h
|
||||
|
|
@ -658,8 +687,6 @@ filegroups:
|
|||
- name: grpc_lb_subchannel_list
|
||||
headers:
|
||||
- src/core/ext/filters/client_channel/lb_policy/subchannel_list.h
|
||||
src:
|
||||
- src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc
|
||||
uses:
|
||||
- grpc_base
|
||||
- grpc_client_channel
|
||||
|
|
@ -719,6 +746,7 @@ filegroups:
|
|||
public_headers:
|
||||
- include/grpc/grpc_security.h
|
||||
headers:
|
||||
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h
|
||||
- src/core/lib/security/context/security_context.h
|
||||
- src/core/lib/security/credentials/alts/alts_credentials.h
|
||||
- src/core/lib/security/credentials/composite/composite_credentials.h
|
||||
|
|
@ -799,6 +827,7 @@ filegroups:
|
|||
- test/core/end2end/fixtures/proxy.h
|
||||
- test/core/iomgr/endpoint_tests.h
|
||||
- test/core/util/debugger_macros.h
|
||||
- test/core/util/fuzzer_util.h
|
||||
- test/core/util/grpc_profiler.h
|
||||
- test/core/util/histogram.h
|
||||
- test/core/util/memory_counters.h
|
||||
|
|
@ -818,6 +847,7 @@ filegroups:
|
|||
- test/core/end2end/fixtures/proxy.cc
|
||||
- test/core/iomgr/endpoint_tests.cc
|
||||
- test/core/util/debugger_macros.cc
|
||||
- test/core/util/fuzzer_util.cc
|
||||
- test/core/util/grpc_profiler.cc
|
||||
- test/core/util/histogram.cc
|
||||
- test/core/util/memory_counters.cc
|
||||
|
|
@ -912,8 +942,10 @@ filegroups:
|
|||
- gpr
|
||||
- name: grpc_transport_chttp2_client_connector
|
||||
headers:
|
||||
- src/core/ext/transport/chttp2/client/authority.h
|
||||
- src/core/ext/transport/chttp2/client/chttp2_connector.h
|
||||
src:
|
||||
- src/core/ext/transport/chttp2/client/authority.cc
|
||||
- src/core/ext/transport/chttp2/client/chttp2_connector.cc
|
||||
uses:
|
||||
- grpc_transport_chttp2
|
||||
|
|
@ -1024,12 +1056,17 @@ filegroups:
|
|||
headers:
|
||||
- src/core/tsi/alts_transport_security.h
|
||||
- src/core/tsi/fake_transport_security.h
|
||||
- src/core/tsi/ssl/session_cache/ssl_session.h
|
||||
- src/core/tsi/ssl/session_cache/ssl_session_cache.h
|
||||
- src/core/tsi/ssl_transport_security.h
|
||||
- src/core/tsi/ssl_types.h
|
||||
- src/core/tsi/transport_security_grpc.h
|
||||
src:
|
||||
- src/core/tsi/alts_transport_security.cc
|
||||
- src/core/tsi/fake_transport_security.cc
|
||||
- src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc
|
||||
- src/core/tsi/ssl/session_cache/ssl_session_cache.cc
|
||||
- src/core/tsi/ssl/session_cache/ssl_session_openssl.cc
|
||||
- src/core/tsi/ssl_transport_security.cc
|
||||
- src/core/tsi/transport_security_grpc.cc
|
||||
deps:
|
||||
|
|
@ -1043,16 +1080,18 @@ filegroups:
|
|||
- name: tsi_interface
|
||||
headers:
|
||||
- src/core/tsi/transport_security.h
|
||||
- src/core/tsi/transport_security_adapter.h
|
||||
- src/core/tsi/transport_security_interface.h
|
||||
src:
|
||||
- src/core/tsi/transport_security.cc
|
||||
- src/core/tsi/transport_security_adapter.cc
|
||||
deps:
|
||||
- gpr
|
||||
secure: true
|
||||
uses:
|
||||
- grpc_trace
|
||||
- name: grpc++_channelz_proto
|
||||
language: c++
|
||||
src:
|
||||
- src/proto/grpc/channelz/channelz.proto
|
||||
- name: grpc++_codegen_base
|
||||
language: c++
|
||||
public_headers:
|
||||
|
|
@ -1128,6 +1167,8 @@ filegroups:
|
|||
language: c++
|
||||
public_headers:
|
||||
- include/grpc++/impl/codegen/proto_utils.h
|
||||
- include/grpcpp/impl/codegen/proto_buffer_reader.h
|
||||
- include/grpcpp/impl/codegen/proto_buffer_writer.h
|
||||
- include/grpcpp/impl/codegen/proto_utils.h
|
||||
uses:
|
||||
- grpc++_codegen_base
|
||||
|
|
@ -1218,6 +1259,8 @@ filegroups:
|
|||
- include/grpcpp/support/byte_buffer.h
|
||||
- include/grpcpp/support/channel_arguments.h
|
||||
- include/grpcpp/support/config.h
|
||||
- include/grpcpp/support/proto_buffer_reader.h
|
||||
- include/grpcpp/support/proto_buffer_writer.h
|
||||
- include/grpcpp/support/slice.h
|
||||
- include/grpcpp/support/status.h
|
||||
- include/grpcpp/support/status_code_enum.h
|
||||
|
|
@ -1264,7 +1307,6 @@ filegroups:
|
|||
- src/cpp/server/server_posix.cc
|
||||
- src/cpp/thread_manager/thread_manager.cc
|
||||
- src/cpp/util/byte_buffer_cc.cc
|
||||
- src/cpp/util/slice_cc.cc
|
||||
- src/cpp/util/status.cc
|
||||
- src/cpp/util/string_ref.cc
|
||||
- src/cpp/util/time_cc.cc
|
||||
|
|
@ -1294,6 +1336,17 @@ filegroups:
|
|||
- grpc++
|
||||
- grpc
|
||||
libs:
|
||||
- name: address_sorting
|
||||
build: all
|
||||
language: c
|
||||
headers:
|
||||
- third_party/address_sorting/address_sorting_internal.h
|
||||
- third_party/address_sorting/include/address_sorting/address_sorting.h
|
||||
src:
|
||||
- third_party/address_sorting/address_sorting.c
|
||||
- third_party/address_sorting/address_sorting_posix.c
|
||||
- third_party/address_sorting/address_sorting_windows.c
|
||||
secure: false
|
||||
- name: alts_test_util
|
||||
build: private
|
||||
language: c
|
||||
|
|
@ -1352,6 +1405,7 @@ libs:
|
|||
- grpc_max_age_filter
|
||||
- grpc_message_size_filter
|
||||
- grpc_deadline_filter
|
||||
- grpc_client_authority_filter
|
||||
- grpc_workaround_cronet_compression_filter
|
||||
- grpc_server_backward_compatibility
|
||||
generate_plugin_registry: true
|
||||
|
|
@ -1454,6 +1508,7 @@ libs:
|
|||
- grpc_max_age_filter
|
||||
- grpc_message_size_filter
|
||||
- grpc_deadline_filter
|
||||
- grpc_client_authority_filter
|
||||
- grpc_workaround_cronet_compression_filter
|
||||
- grpc_server_backward_compatibility
|
||||
generate_plugin_registry: true
|
||||
|
|
@ -1601,17 +1656,20 @@ libs:
|
|||
headers:
|
||||
- test/cpp/end2end/test_service_impl.h
|
||||
- test/cpp/util/byte_buffer_proto_helper.h
|
||||
- test/cpp/util/channel_trace_proto_helper.h
|
||||
- test/cpp/util/create_test_channel.h
|
||||
- test/cpp/util/string_ref_helper.h
|
||||
- test/cpp/util/subprocess.h
|
||||
- test/cpp/util/test_credentials_provider.h
|
||||
src:
|
||||
- src/proto/grpc/channelz/channelz.proto
|
||||
- src/proto/grpc/health/v1/health.proto
|
||||
- src/proto/grpc/testing/echo_messages.proto
|
||||
- src/proto/grpc/testing/echo.proto
|
||||
- src/proto/grpc/testing/duplicate/echo_duplicate.proto
|
||||
- test/cpp/end2end/test_service_impl.cc
|
||||
- test/cpp/util/byte_buffer_proto_helper.cc
|
||||
- test/cpp/util/channel_trace_proto_helper.cc
|
||||
- test/cpp/util/create_test_channel.cc
|
||||
- test/cpp/util/string_ref_helper.cc
|
||||
- test/cpp/util/subprocess.cc
|
||||
|
|
@ -1833,6 +1891,15 @@ libs:
|
|||
- test/cpp/interop/interop_server_bootstrap.cc
|
||||
deps:
|
||||
- interop_server_lib
|
||||
- name: lb_load_data_store
|
||||
build: private
|
||||
language: c++
|
||||
headers:
|
||||
- src/cpp/server/load_reporter/load_data_store.h
|
||||
src:
|
||||
- src/cpp/server/load_reporter/load_data_store.cc
|
||||
deps:
|
||||
- grpc++
|
||||
- name: qps
|
||||
build: private
|
||||
language: c++
|
||||
|
|
@ -1853,7 +1920,9 @@ libs:
|
|||
- src/proto/grpc/testing/payloads.proto
|
||||
- src/proto/grpc/testing/stats.proto
|
||||
- src/proto/grpc/testing/control.proto
|
||||
- src/proto/grpc/testing/services.proto
|
||||
- src/proto/grpc/testing/benchmark_service.proto
|
||||
- src/proto/grpc/testing/report_qps_scenario_service.proto
|
||||
- src/proto/grpc/testing/worker_service.proto
|
||||
- test/cpp/qps/benchmark_config.cc
|
||||
- test/cpp/qps/client_async.cc
|
||||
- test/cpp/qps/client_sync.cc
|
||||
|
|
@ -1922,6 +1991,19 @@ targets:
|
|||
- grpc
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
- name: alts_credentials_fuzzer
|
||||
build: fuzzer
|
||||
language: c
|
||||
src:
|
||||
- test/core/security/alts_credentials_fuzzer.cc
|
||||
deps:
|
||||
- grpc_test_util
|
||||
- grpc
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
corpus_dirs:
|
||||
- test/core/security/corpus/alts_credentials_corpus
|
||||
maxlen: 2048
|
||||
- name: api_fuzzer
|
||||
build: fuzzer
|
||||
language: c
|
||||
|
|
@ -1986,17 +2068,6 @@ targets:
|
|||
- grpc_test_util
|
||||
- grpc
|
||||
uses_polling: false
|
||||
- name: byte_stream_test
|
||||
build: test
|
||||
language: c
|
||||
src:
|
||||
- test/core/transport/byte_stream_test.cc
|
||||
deps:
|
||||
- grpc_test_util
|
||||
- grpc
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
uses_polling: false
|
||||
- name: channel_create_test
|
||||
build: test
|
||||
language: c
|
||||
|
|
@ -2588,17 +2659,6 @@ targets:
|
|||
- grpc
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
- name: grpc_invalid_channel_args_test
|
||||
build: test
|
||||
language: c
|
||||
src:
|
||||
- test/core/surface/invalid_channel_args_test.cc
|
||||
deps:
|
||||
- grpc_test_util
|
||||
- grpc
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
uses_polling: false
|
||||
- name: grpc_json_token_test
|
||||
build: test
|
||||
language: c
|
||||
|
|
@ -3787,6 +3847,7 @@ targets:
|
|||
- grpc_unsecure
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
- grpc++_test_config
|
||||
benchmark: true
|
||||
defaults: benchmark
|
||||
platforms:
|
||||
|
|
@ -3808,6 +3869,7 @@ targets:
|
|||
- grpc_unsecure
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
- grpc++_test_config
|
||||
benchmark: true
|
||||
defaults: benchmark
|
||||
platforms:
|
||||
|
|
@ -3829,6 +3891,7 @@ targets:
|
|||
- grpc_unsecure
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
- grpc++_test_config
|
||||
benchmark: true
|
||||
defaults: benchmark
|
||||
platforms:
|
||||
|
|
@ -3850,6 +3913,7 @@ targets:
|
|||
- grpc_unsecure
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
- grpc++_test_config
|
||||
benchmark: true
|
||||
defaults: benchmark
|
||||
platforms:
|
||||
|
|
@ -3870,6 +3934,7 @@ targets:
|
|||
- grpc_unsecure
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
- grpc++_test_config
|
||||
benchmark: true
|
||||
defaults: benchmark
|
||||
platforms:
|
||||
|
|
@ -3890,6 +3955,7 @@ targets:
|
|||
- grpc_unsecure
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
- grpc++_test_config
|
||||
benchmark: true
|
||||
defaults: benchmark
|
||||
platforms:
|
||||
|
|
@ -3910,6 +3976,7 @@ targets:
|
|||
- grpc_unsecure
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
- grpc++_test_config
|
||||
benchmark: true
|
||||
defaults: benchmark
|
||||
platforms:
|
||||
|
|
@ -3930,6 +3997,7 @@ targets:
|
|||
- grpc_unsecure
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
- grpc++_test_config
|
||||
benchmark: true
|
||||
defaults: benchmark
|
||||
platforms:
|
||||
|
|
@ -3953,6 +4021,7 @@ targets:
|
|||
- grpc_unsecure
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
- grpc++_test_config
|
||||
benchmark: true
|
||||
defaults: benchmark
|
||||
excluded_poll_engines:
|
||||
|
|
@ -3979,6 +4048,7 @@ targets:
|
|||
- grpc_unsecure
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
- grpc++_test_config
|
||||
benchmark: true
|
||||
defaults: benchmark
|
||||
excluded_poll_engines:
|
||||
|
|
@ -4032,6 +4102,7 @@ targets:
|
|||
- grpc_unsecure
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
- grpc++_test_config
|
||||
benchmark: true
|
||||
defaults: benchmark
|
||||
excluded_poll_engines:
|
||||
|
|
@ -4056,6 +4127,7 @@ targets:
|
|||
- grpc_unsecure
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
- grpc++_test_config
|
||||
benchmark: true
|
||||
defaults: benchmark
|
||||
platforms:
|
||||
|
|
@ -4077,12 +4149,25 @@ targets:
|
|||
- grpc_unsecure
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
- grpc++_test_config
|
||||
benchmark: true
|
||||
defaults: benchmark
|
||||
platforms:
|
||||
- mac
|
||||
- linux
|
||||
- posix
|
||||
- name: byte_stream_test
|
||||
gtest: true
|
||||
build: test
|
||||
language: c++
|
||||
src:
|
||||
- test/core/transport/byte_stream_test.cc
|
||||
deps:
|
||||
- grpc_test_util
|
||||
- grpc
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
uses_polling: false
|
||||
- name: channel_arguments_test
|
||||
gtest: true
|
||||
build: test
|
||||
|
|
@ -4105,6 +4190,24 @@ targets:
|
|||
- grpc
|
||||
- gpr
|
||||
uses_polling: false
|
||||
- name: channel_trace_test
|
||||
gtest: true
|
||||
build: test
|
||||
language: c++
|
||||
src:
|
||||
- test/core/channel/channel_trace_test.cc
|
||||
deps:
|
||||
- grpc_test_util
|
||||
- grpc++_test_util
|
||||
- grpc++
|
||||
- grpc
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
filegroups:
|
||||
- grpc++_channelz_proto
|
||||
uses:
|
||||
- grpc++_test
|
||||
uses_polling: false
|
||||
- name: check_gcp_environment_linux_test
|
||||
build: test
|
||||
language: c++
|
||||
|
|
@ -4213,7 +4316,9 @@ targets:
|
|||
- src/proto/grpc/testing/control.proto
|
||||
- src/proto/grpc/testing/messages.proto
|
||||
- src/proto/grpc/testing/payloads.proto
|
||||
- src/proto/grpc/testing/services.proto
|
||||
- src/proto/grpc/testing/benchmark_service.proto
|
||||
- src/proto/grpc/testing/report_qps_scenario_service.proto
|
||||
- src/proto/grpc/testing/worker_service.proto
|
||||
- src/proto/grpc/testing/stats.proto
|
||||
- test/cpp/codegen/codegen_test_full.cc
|
||||
deps:
|
||||
|
|
@ -4232,7 +4337,9 @@ targets:
|
|||
- src/proto/grpc/testing/control.proto
|
||||
- src/proto/grpc/testing/messages.proto
|
||||
- src/proto/grpc/testing/payloads.proto
|
||||
- src/proto/grpc/testing/services.proto
|
||||
- src/proto/grpc/testing/benchmark_service.proto
|
||||
- src/proto/grpc/testing/report_qps_scenario_service.proto
|
||||
- src/proto/grpc/testing/worker_service.proto
|
||||
- src/proto/grpc/testing/stats.proto
|
||||
- test/cpp/codegen/codegen_test_minimal.cc
|
||||
deps:
|
||||
|
|
@ -4530,6 +4637,22 @@ targets:
|
|||
- gpr
|
||||
uses:
|
||||
- grpc++_test
|
||||
- name: h2_ssl_session_reuse_test
|
||||
gtest: true
|
||||
build: test
|
||||
language: c++
|
||||
headers:
|
||||
- test/core/end2end/end2end_tests.h
|
||||
src:
|
||||
- test/core/end2end/h2_ssl_session_reuse_test.cc
|
||||
deps:
|
||||
- grpc_test_util
|
||||
- grpc++
|
||||
- grpc
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
uses:
|
||||
- grpc++_test
|
||||
- name: health_service_end2end_test
|
||||
gtest: true
|
||||
build: test
|
||||
|
|
@ -4678,6 +4801,20 @@ targets:
|
|||
- mac
|
||||
- linux
|
||||
- posix
|
||||
- name: lb_load_data_store_test
|
||||
gtest: true
|
||||
build: test
|
||||
language: c++
|
||||
src:
|
||||
- test/cpp/server/load_reporter/load_data_store_test.cc
|
||||
deps:
|
||||
- lb_load_data_store
|
||||
- grpc++_test_util
|
||||
- grpc_test_util
|
||||
- grpc++
|
||||
- grpc
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
- name: memory_test
|
||||
gtest: true
|
||||
build: test
|
||||
|
|
@ -4925,6 +5062,18 @@ targets:
|
|||
- gpr
|
||||
uses:
|
||||
- grpc++_test
|
||||
- name: retry_throttle_test
|
||||
gtest: true
|
||||
build: test
|
||||
language: c++
|
||||
src:
|
||||
- test/core/client_channel/retry_throttle_test.cc
|
||||
deps:
|
||||
- grpc_test_util
|
||||
- grpc
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
uses_polling: false
|
||||
- name: secure_auth_context_test
|
||||
gtest: true
|
||||
build: test
|
||||
|
|
@ -4985,6 +5134,23 @@ targets:
|
|||
- grpc++_unsecure
|
||||
- grpc_unsecure
|
||||
- gpr
|
||||
- name: server_builder_with_socket_mutator_test
|
||||
gtest: true
|
||||
build: test
|
||||
language: c++
|
||||
src:
|
||||
- src/proto/grpc/testing/echo_messages.proto
|
||||
- src/proto/grpc/testing/echo.proto
|
||||
- test/cpp/server/server_builder_with_socket_mutator_test.cc
|
||||
deps:
|
||||
- grpc++_test_util_unsecure
|
||||
- grpc_test_util_unsecure
|
||||
- gpr_test_util
|
||||
- grpc++_unsecure
|
||||
- grpc_unsecure
|
||||
- gpr
|
||||
platforms:
|
||||
- posix
|
||||
- name: server_context_test_spouse_test
|
||||
gtest: true
|
||||
build: test
|
||||
|
|
@ -5120,25 +5286,13 @@ targets:
|
|||
deps:
|
||||
- grpc
|
||||
uses_polling: false
|
||||
- name: status_test
|
||||
build: test
|
||||
language: c++
|
||||
src:
|
||||
- test/cpp/util/status_test.cc
|
||||
deps:
|
||||
- grpc_test_util
|
||||
- grpc++
|
||||
- grpc
|
||||
- gpr_test_util
|
||||
- gpr
|
||||
uses_polling: false
|
||||
- name: status_util_test
|
||||
gtest: true
|
||||
cpu_cost: 0.1
|
||||
build: test
|
||||
language: c++
|
||||
src:
|
||||
- test/core/client_channel/status_util_test.cc
|
||||
- test/core/channel/status_util_test.cc
|
||||
deps:
|
||||
- grpc
|
||||
uses_polling: false
|
||||
|
|
@ -5387,11 +5541,11 @@ configs:
|
|||
DEFINES: NDEBUG
|
||||
LDFLAGS: -rdynamic
|
||||
noexcept:
|
||||
CPPFLAGS: -O2
|
||||
CPPFLAGS: -O2 -Wframe-larger-than=16384
|
||||
CXXFLAGS: -fno-exceptions
|
||||
DEFINES: NDEBUG
|
||||
opt:
|
||||
CPPFLAGS: -O2
|
||||
CPPFLAGS: -O2 -Wframe-larger-than=16384
|
||||
DEFINES: NDEBUG
|
||||
stapprof:
|
||||
CPPFLAGS: -O2 -DGRPC_STAP_PROFILER
|
||||
|
|
@ -5456,6 +5610,7 @@ php_config_m4:
|
|||
- gpr
|
||||
- boringssl
|
||||
- z
|
||||
- address_sorting
|
||||
headers:
|
||||
- src/php/ext/grpc/byte_buffer.h
|
||||
- src/php/ext/grpc/call.h
|
||||
|
|
@ -5487,6 +5642,7 @@ python_dependencies:
|
|||
- ares
|
||||
- boringssl
|
||||
- z
|
||||
- address_sorting
|
||||
ruby_gem:
|
||||
deps:
|
||||
- grpc
|
||||
|
|
@ -5494,3 +5650,4 @@ ruby_gem:
|
|||
- ares
|
||||
- boringssl
|
||||
- z
|
||||
- address_sorting
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
# Copyright 2017 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(_gRPC_ADDRESS_SORTING_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/address_sorting/include")
|
||||
set(_gRPC_ADDRESS_SORTING_LIBRARIES address_sorting)
|
||||
44
config.m4
44
config.m4
|
|
@ -8,11 +8,12 @@ if test "$PHP_GRPC" != "no"; then
|
|||
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/include)
|
||||
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/src/php/ext/grpc)
|
||||
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/boringssl/include)
|
||||
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/address_sorting/include)
|
||||
|
||||
LIBS="-lpthread $LIBS"
|
||||
|
||||
CFLAGS="-Wall -Werror -Wno-parentheses-equality -Wno-unused-value -std=c11"
|
||||
CXXFLAGS="-std=c++11 -fno-exceptions -fno-rtti"
|
||||
CFLAGS="-Wall -Werror -Wno-parentheses-equality -Wno-unused-value -std=c11 -g -O2 -D PB_FIELD_16BIT=1"
|
||||
CXXFLAGS="-std=c++11 -fno-exceptions -fno-rtti -g -O2 -D PB_FIELD_16BIT=1"
|
||||
GRPC_SHARED_LIBADD="-lpthread $GRPC_SHARED_LIBADD"
|
||||
PHP_REQUIRE_CXX()
|
||||
PHP_ADD_LIBRARY(pthread)
|
||||
|
|
@ -39,6 +40,9 @@ if test "$PHP_GRPC" != "no"; then
|
|||
src/php/ext/grpc/server.c \
|
||||
src/php/ext/grpc/server_credentials.c \
|
||||
src/php/ext/grpc/timeval.c \
|
||||
third_party/address_sorting/address_sorting.c \
|
||||
third_party/address_sorting/address_sorting_posix.c \
|
||||
third_party/address_sorting/address_sorting_windows.c \
|
||||
src/core/lib/gpr/alloc.cc \
|
||||
src/core/lib/gpr/arena.cc \
|
||||
src/core/lib/gpr/atm.cc \
|
||||
|
|
@ -84,10 +88,13 @@ if test "$PHP_GRPC" != "no"; then
|
|||
src/core/lib/channel/channel_args.cc \
|
||||
src/core/lib/channel/channel_stack.cc \
|
||||
src/core/lib/channel/channel_stack_builder.cc \
|
||||
src/core/lib/channel/channel_trace.cc \
|
||||
src/core/lib/channel/channel_trace_registry.cc \
|
||||
src/core/lib/channel/connected_channel.cc \
|
||||
src/core/lib/channel/handshaker.cc \
|
||||
src/core/lib/channel/handshaker_factory.cc \
|
||||
src/core/lib/channel/handshaker_registry.cc \
|
||||
src/core/lib/channel/status_util.cc \
|
||||
src/core/lib/compression/compression.cc \
|
||||
src/core/lib/compression/compression_internal.cc \
|
||||
src/core/lib/compression/message_compress.cc \
|
||||
|
|
@ -121,6 +128,8 @@ if test "$PHP_GRPC" != "no"; then
|
|||
src/core/lib/iomgr/gethostname_sysconf.cc \
|
||||
src/core/lib/iomgr/iocp_windows.cc \
|
||||
src/core/lib/iomgr/iomgr.cc \
|
||||
src/core/lib/iomgr/iomgr_custom.cc \
|
||||
src/core/lib/iomgr/iomgr_internal.cc \
|
||||
src/core/lib/iomgr/iomgr_posix.cc \
|
||||
src/core/lib/iomgr/iomgr_uv.cc \
|
||||
src/core/lib/iomgr/iomgr_windows.cc \
|
||||
|
|
@ -129,12 +138,16 @@ if test "$PHP_GRPC" != "no"; then
|
|||
src/core/lib/iomgr/lockfree_event.cc \
|
||||
src/core/lib/iomgr/network_status_tracker.cc \
|
||||
src/core/lib/iomgr/polling_entity.cc \
|
||||
src/core/lib/iomgr/pollset_set_uv.cc \
|
||||
src/core/lib/iomgr/pollset.cc \
|
||||
src/core/lib/iomgr/pollset_custom.cc \
|
||||
src/core/lib/iomgr/pollset_set.cc \
|
||||
src/core/lib/iomgr/pollset_set_custom.cc \
|
||||
src/core/lib/iomgr/pollset_set_windows.cc \
|
||||
src/core/lib/iomgr/pollset_uv.cc \
|
||||
src/core/lib/iomgr/pollset_windows.cc \
|
||||
src/core/lib/iomgr/resolve_address.cc \
|
||||
src/core/lib/iomgr/resolve_address_custom.cc \
|
||||
src/core/lib/iomgr/resolve_address_posix.cc \
|
||||
src/core/lib/iomgr/resolve_address_uv.cc \
|
||||
src/core/lib/iomgr/resolve_address_windows.cc \
|
||||
src/core/lib/iomgr/resource_quota.cc \
|
||||
src/core/lib/iomgr/sockaddr_utils.cc \
|
||||
|
|
@ -146,19 +159,24 @@ if test "$PHP_GRPC" != "no"; then
|
|||
src/core/lib/iomgr/socket_utils_uv.cc \
|
||||
src/core/lib/iomgr/socket_utils_windows.cc \
|
||||
src/core/lib/iomgr/socket_windows.cc \
|
||||
src/core/lib/iomgr/tcp_client.cc \
|
||||
src/core/lib/iomgr/tcp_client_custom.cc \
|
||||
src/core/lib/iomgr/tcp_client_posix.cc \
|
||||
src/core/lib/iomgr/tcp_client_uv.cc \
|
||||
src/core/lib/iomgr/tcp_client_windows.cc \
|
||||
src/core/lib/iomgr/tcp_custom.cc \
|
||||
src/core/lib/iomgr/tcp_posix.cc \
|
||||
src/core/lib/iomgr/tcp_server.cc \
|
||||
src/core/lib/iomgr/tcp_server_custom.cc \
|
||||
src/core/lib/iomgr/tcp_server_posix.cc \
|
||||
src/core/lib/iomgr/tcp_server_utils_posix_common.cc \
|
||||
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
|
||||
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
|
||||
src/core/lib/iomgr/tcp_server_uv.cc \
|
||||
src/core/lib/iomgr/tcp_server_windows.cc \
|
||||
src/core/lib/iomgr/tcp_uv.cc \
|
||||
src/core/lib/iomgr/tcp_windows.cc \
|
||||
src/core/lib/iomgr/time_averaged_stats.cc \
|
||||
src/core/lib/iomgr/timer.cc \
|
||||
src/core/lib/iomgr/timer_custom.cc \
|
||||
src/core/lib/iomgr/timer_generic.cc \
|
||||
src/core/lib/iomgr/timer_heap.cc \
|
||||
src/core/lib/iomgr/timer_manager.cc \
|
||||
|
|
@ -303,9 +321,9 @@ if test "$PHP_GRPC" != "no"; then
|
|||
third_party/nanopb/pb_decode.c \
|
||||
third_party/nanopb/pb_encode.c \
|
||||
src/core/tsi/transport_security.cc \
|
||||
src/core/tsi/transport_security_adapter.cc \
|
||||
src/core/ext/transport/chttp2/client/insecure/channel_create.cc \
|
||||
src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc \
|
||||
src/core/ext/transport/chttp2/client/authority.cc \
|
||||
src/core/ext/transport/chttp2/client/chttp2_connector.cc \
|
||||
src/core/ext/filters/client_channel/backup_poller.cc \
|
||||
src/core/ext/filters/client_channel/channel_connectivity.cc \
|
||||
|
|
@ -325,13 +343,15 @@ if test "$PHP_GRPC" != "no"; then
|
|||
src/core/ext/filters/client_channel/resolver.cc \
|
||||
src/core/ext/filters/client_channel/resolver_registry.cc \
|
||||
src/core/ext/filters/client_channel/retry_throttle.cc \
|
||||
src/core/ext/filters/client_channel/status_util.cc \
|
||||
src/core/ext/filters/client_channel/subchannel.cc \
|
||||
src/core/ext/filters/client_channel/subchannel_index.cc \
|
||||
src/core/ext/filters/client_channel/uri_parser.cc \
|
||||
src/core/ext/filters/deadline/deadline_filter.cc \
|
||||
src/core/tsi/alts_transport_security.cc \
|
||||
src/core/tsi/fake_transport_security.cc \
|
||||
src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc \
|
||||
src/core/tsi/ssl/session_cache/ssl_session_cache.cc \
|
||||
src/core/tsi/ssl/session_cache/ssl_session_openssl.cc \
|
||||
src/core/tsi/ssl_transport_security.cc \
|
||||
src/core/tsi/transport_security_grpc.cc \
|
||||
src/core/ext/transport/chttp2/server/chttp2_server.cc \
|
||||
|
|
@ -348,7 +368,6 @@ if test "$PHP_GRPC" != "no"; then
|
|||
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \
|
||||
src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc \
|
||||
src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc \
|
||||
src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc \
|
||||
src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \
|
||||
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc \
|
||||
|
|
@ -361,6 +380,7 @@ if test "$PHP_GRPC" != "no"; then
|
|||
src/core/ext/census/grpc_context.cc \
|
||||
src/core/ext/filters/max_age/max_age_filter.cc \
|
||||
src/core/ext/filters/message_size/message_size_filter.cc \
|
||||
src/core/ext/filters/http/client_authority_filter.cc \
|
||||
src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc \
|
||||
src/core/ext/filters/workarounds/workaround_utils.cc \
|
||||
src/core/plugin_registry/grpc_plugin_registry.cc \
|
||||
|
|
@ -433,7 +453,6 @@ if test "$PHP_GRPC" != "no"; then
|
|||
third_party/boringssl/crypto/cpu-intel.c \
|
||||
third_party/boringssl/crypto/cpu-ppc64le.c \
|
||||
third_party/boringssl/crypto/crypto.c \
|
||||
third_party/boringssl/crypto/curve25519/curve25519.c \
|
||||
third_party/boringssl/crypto/curve25519/spake25519.c \
|
||||
third_party/boringssl/crypto/curve25519/x25519-x86_64.c \
|
||||
third_party/boringssl/crypto/dh/check.c \
|
||||
|
|
@ -619,6 +638,7 @@ if test "$PHP_GRPC" != "no"; then
|
|||
third_party/boringssl/ssl/tls13_server.cc \
|
||||
third_party/boringssl/ssl/tls_method.cc \
|
||||
third_party/boringssl/ssl/tls_record.cc \
|
||||
third_party/boringssl/third_party/fiat/curve25519.c \
|
||||
, $ext_shared, , -fvisibility=hidden \
|
||||
-DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN \
|
||||
-D_HAS_EXCEPTIONS=0 -DNOMINMAX -DGRPC_ARES=0)
|
||||
|
|
@ -628,7 +648,6 @@ if test "$PHP_GRPC" != "no"; then
|
|||
PHP_ADD_BUILD_DIR($ext_builddir/src/boringssl)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/census)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy/grpclb)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy/pick_first)
|
||||
|
|
@ -689,6 +708,8 @@ if test "$PHP_GRPC" != "no"; then
|
|||
PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi/alts/frame_protector)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi/alts/handshaker)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi/alts/zero_copy_frame_protector)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi/ssl/session_cache)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/third_party/address_sorting)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/asn1)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/base64)
|
||||
|
|
@ -726,5 +747,6 @@ if test "$PHP_GRPC" != "no"; then
|
|||
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/x509)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/x509v3)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/ssl)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/third_party/fiat)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/third_party/nanopb)
|
||||
fi
|
||||
|
|
|
|||
44
config.w32
44
config.w32
|
|
@ -16,6 +16,9 @@ if (PHP_GRPC != "no") {
|
|||
"src\\php\\ext\\grpc\\server.c " +
|
||||
"src\\php\\ext\\grpc\\server_credentials.c " +
|
||||
"src\\php\\ext\\grpc\\timeval.c " +
|
||||
"third_party\\address_sorting\\address_sorting.c " +
|
||||
"third_party\\address_sorting\\address_sorting_posix.c " +
|
||||
"third_party\\address_sorting\\address_sorting_windows.c " +
|
||||
"src\\core\\lib\\gpr\\alloc.cc " +
|
||||
"src\\core\\lib\\gpr\\arena.cc " +
|
||||
"src\\core\\lib\\gpr\\atm.cc " +
|
||||
|
|
@ -61,10 +64,13 @@ if (PHP_GRPC != "no") {
|
|||
"src\\core\\lib\\channel\\channel_args.cc " +
|
||||
"src\\core\\lib\\channel\\channel_stack.cc " +
|
||||
"src\\core\\lib\\channel\\channel_stack_builder.cc " +
|
||||
"src\\core\\lib\\channel\\channel_trace.cc " +
|
||||
"src\\core\\lib\\channel\\channel_trace_registry.cc " +
|
||||
"src\\core\\lib\\channel\\connected_channel.cc " +
|
||||
"src\\core\\lib\\channel\\handshaker.cc " +
|
||||
"src\\core\\lib\\channel\\handshaker_factory.cc " +
|
||||
"src\\core\\lib\\channel\\handshaker_registry.cc " +
|
||||
"src\\core\\lib\\channel\\status_util.cc " +
|
||||
"src\\core\\lib\\compression\\compression.cc " +
|
||||
"src\\core\\lib\\compression\\compression_internal.cc " +
|
||||
"src\\core\\lib\\compression\\message_compress.cc " +
|
||||
|
|
@ -98,6 +104,8 @@ if (PHP_GRPC != "no") {
|
|||
"src\\core\\lib\\iomgr\\gethostname_sysconf.cc " +
|
||||
"src\\core\\lib\\iomgr\\iocp_windows.cc " +
|
||||
"src\\core\\lib\\iomgr\\iomgr.cc " +
|
||||
"src\\core\\lib\\iomgr\\iomgr_custom.cc " +
|
||||
"src\\core\\lib\\iomgr\\iomgr_internal.cc " +
|
||||
"src\\core\\lib\\iomgr\\iomgr_posix.cc " +
|
||||
"src\\core\\lib\\iomgr\\iomgr_uv.cc " +
|
||||
"src\\core\\lib\\iomgr\\iomgr_windows.cc " +
|
||||
|
|
@ -106,12 +114,16 @@ if (PHP_GRPC != "no") {
|
|||
"src\\core\\lib\\iomgr\\lockfree_event.cc " +
|
||||
"src\\core\\lib\\iomgr\\network_status_tracker.cc " +
|
||||
"src\\core\\lib\\iomgr\\polling_entity.cc " +
|
||||
"src\\core\\lib\\iomgr\\pollset_set_uv.cc " +
|
||||
"src\\core\\lib\\iomgr\\pollset.cc " +
|
||||
"src\\core\\lib\\iomgr\\pollset_custom.cc " +
|
||||
"src\\core\\lib\\iomgr\\pollset_set.cc " +
|
||||
"src\\core\\lib\\iomgr\\pollset_set_custom.cc " +
|
||||
"src\\core\\lib\\iomgr\\pollset_set_windows.cc " +
|
||||
"src\\core\\lib\\iomgr\\pollset_uv.cc " +
|
||||
"src\\core\\lib\\iomgr\\pollset_windows.cc " +
|
||||
"src\\core\\lib\\iomgr\\resolve_address.cc " +
|
||||
"src\\core\\lib\\iomgr\\resolve_address_custom.cc " +
|
||||
"src\\core\\lib\\iomgr\\resolve_address_posix.cc " +
|
||||
"src\\core\\lib\\iomgr\\resolve_address_uv.cc " +
|
||||
"src\\core\\lib\\iomgr\\resolve_address_windows.cc " +
|
||||
"src\\core\\lib\\iomgr\\resource_quota.cc " +
|
||||
"src\\core\\lib\\iomgr\\sockaddr_utils.cc " +
|
||||
|
|
@ -123,19 +135,24 @@ if (PHP_GRPC != "no") {
|
|||
"src\\core\\lib\\iomgr\\socket_utils_uv.cc " +
|
||||
"src\\core\\lib\\iomgr\\socket_utils_windows.cc " +
|
||||
"src\\core\\lib\\iomgr\\socket_windows.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_client.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_client_custom.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_client_posix.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_client_uv.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_client_windows.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_custom.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_posix.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_server.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_server_custom.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_server_posix.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_server_utils_posix_common.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_server_utils_posix_ifaddrs.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_server_utils_posix_noifaddrs.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_server_uv.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_server_windows.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_uv.cc " +
|
||||
"src\\core\\lib\\iomgr\\tcp_windows.cc " +
|
||||
"src\\core\\lib\\iomgr\\time_averaged_stats.cc " +
|
||||
"src\\core\\lib\\iomgr\\timer.cc " +
|
||||
"src\\core\\lib\\iomgr\\timer_custom.cc " +
|
||||
"src\\core\\lib\\iomgr\\timer_generic.cc " +
|
||||
"src\\core\\lib\\iomgr\\timer_heap.cc " +
|
||||
"src\\core\\lib\\iomgr\\timer_manager.cc " +
|
||||
|
|
@ -280,9 +297,9 @@ if (PHP_GRPC != "no") {
|
|||
"third_party\\nanopb\\pb_decode.c " +
|
||||
"third_party\\nanopb\\pb_encode.c " +
|
||||
"src\\core\\tsi\\transport_security.cc " +
|
||||
"src\\core\\tsi\\transport_security_adapter.cc " +
|
||||
"src\\core\\ext\\transport\\chttp2\\client\\insecure\\channel_create.cc " +
|
||||
"src\\core\\ext\\transport\\chttp2\\client\\insecure\\channel_create_posix.cc " +
|
||||
"src\\core\\ext\\transport\\chttp2\\client\\authority.cc " +
|
||||
"src\\core\\ext\\transport\\chttp2\\client\\chttp2_connector.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\backup_poller.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\channel_connectivity.cc " +
|
||||
|
|
@ -302,13 +319,15 @@ if (PHP_GRPC != "no") {
|
|||
"src\\core\\ext\\filters\\client_channel\\resolver.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\resolver_registry.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\retry_throttle.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\status_util.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\subchannel.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\subchannel_index.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\uri_parser.cc " +
|
||||
"src\\core\\ext\\filters\\deadline\\deadline_filter.cc " +
|
||||
"src\\core\\tsi\\alts_transport_security.cc " +
|
||||
"src\\core\\tsi\\fake_transport_security.cc " +
|
||||
"src\\core\\tsi\\ssl\\session_cache\\ssl_session_boringssl.cc " +
|
||||
"src\\core\\tsi\\ssl\\session_cache\\ssl_session_cache.cc " +
|
||||
"src\\core\\tsi\\ssl\\session_cache\\ssl_session_openssl.cc " +
|
||||
"src\\core\\tsi\\ssl_transport_security.cc " +
|
||||
"src\\core\\tsi\\transport_security_grpc.cc " +
|
||||
"src\\core\\ext\\transport\\chttp2\\server\\chttp2_server.cc " +
|
||||
|
|
@ -325,7 +344,6 @@ if (PHP_GRPC != "no") {
|
|||
"src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto\\grpc\\lb\\v1\\load_balancer.pb.c " +
|
||||
"src\\core\\ext\\filters\\client_channel\\resolver\\fake\\fake_resolver.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\lb_policy\\pick_first\\pick_first.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\lb_policy\\subchannel_list.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\lb_policy\\round_robin\\round_robin.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\dns_resolver_ares.cc " +
|
||||
"src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\grpc_ares_ev_driver_posix.cc " +
|
||||
|
|
@ -338,6 +356,7 @@ if (PHP_GRPC != "no") {
|
|||
"src\\core\\ext\\census\\grpc_context.cc " +
|
||||
"src\\core\\ext\\filters\\max_age\\max_age_filter.cc " +
|
||||
"src\\core\\ext\\filters\\message_size\\message_size_filter.cc " +
|
||||
"src\\core\\ext\\filters\\http\\client_authority_filter.cc " +
|
||||
"src\\core\\ext\\filters\\workarounds\\workaround_cronet_compression_filter.cc " +
|
||||
"src\\core\\ext\\filters\\workarounds\\workaround_utils.cc " +
|
||||
"src\\core\\plugin_registry\\grpc_plugin_registry.cc " +
|
||||
|
|
@ -410,7 +429,6 @@ if (PHP_GRPC != "no") {
|
|||
"third_party\\boringssl\\crypto\\cpu-intel.c " +
|
||||
"third_party\\boringssl\\crypto\\cpu-ppc64le.c " +
|
||||
"third_party\\boringssl\\crypto\\crypto.c " +
|
||||
"third_party\\boringssl\\crypto\\curve25519\\curve25519.c " +
|
||||
"third_party\\boringssl\\crypto\\curve25519\\spake25519.c " +
|
||||
"third_party\\boringssl\\crypto\\curve25519\\x25519-x86_64.c " +
|
||||
"third_party\\boringssl\\crypto\\dh\\check.c " +
|
||||
|
|
@ -596,6 +614,7 @@ if (PHP_GRPC != "no") {
|
|||
"third_party\\boringssl\\ssl\\tls13_server.cc " +
|
||||
"third_party\\boringssl\\ssl\\tls_method.cc " +
|
||||
"third_party\\boringssl\\ssl\\tls_record.cc " +
|
||||
"third_party\\boringssl\\third_party\\fiat\\curve25519.c " +
|
||||
"third_party\\zlib\\adler32.c " +
|
||||
"third_party\\zlib\\compress.c " +
|
||||
"third_party\\zlib\\crc32.c " +
|
||||
|
|
@ -616,11 +635,13 @@ if (PHP_GRPC != "no") {
|
|||
EXTENSION("grpc", grpc_source, null,
|
||||
"/DOPENSSL_NO_ASM /D_GNU_SOURCE /DWIN32_LEAN_AND_MEAN "+
|
||||
"/D_HAS_EXCEPTIONS=0 /DNOMINMAX /DGRPC_ARES=0 /D_WIN32_WINNT=0x600 "+
|
||||
"/DPB_FIELD_16BIT "+
|
||||
"/I"+configure_module_dirname+" "+
|
||||
"/I"+configure_module_dirname+"\\include "+
|
||||
"/I"+configure_module_dirname+"\\src\\php\\ext\\grpc "+
|
||||
"/I"+configure_module_dirname+"\\third_party\\boringssl\\include "+
|
||||
"/I"+configure_module_dirname+"\\third_party\\zlib");
|
||||
"/I"+configure_module_dirname+"\\third_party\\zlib "+
|
||||
"/I"+configure_module_dirname+"\\third_party\\address_sorting\\include");
|
||||
|
||||
base_dir = get_define('BUILD_DIR');
|
||||
FSO.CreateFolder(base_dir+"\\ext");
|
||||
|
|
@ -703,10 +724,13 @@ if (PHP_GRPC != "no") {
|
|||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\alts\\frame_protector");
|
||||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\alts\\handshaker");
|
||||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\alts\\zero_copy_frame_protector");
|
||||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\ssl");
|
||||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\ssl\\session_cache");
|
||||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\php");
|
||||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\php\\ext");
|
||||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\php\\ext\\grpc");
|
||||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party");
|
||||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\address_sorting");
|
||||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl");
|
||||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto");
|
||||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\asn1");
|
||||
|
|
@ -745,6 +769,8 @@ if (PHP_GRPC != "no") {
|
|||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\x509");
|
||||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\x509v3");
|
||||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\ssl");
|
||||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\third_party");
|
||||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\third_party\\fiat");
|
||||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\nanopb");
|
||||
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\zlib");
|
||||
_build_dirs = new Array();
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ More specifically, we expect the protocol to
|
|||
* evolve over time, mainly to optimize for browser clients or support
|
||||
web-specific features such as CORS, XSRF
|
||||
* become optional (in 1-2 years) when browsers are able to speak the native
|
||||
gRPC protocol via the new [whatwg fetch/streams API](https://github.com/whatwg/fetch)
|
||||
gRPC protocol via the new [whatwg streams API](https://github.com/whatwg/streams)
|
||||
|
||||
# Protocol differences vs [gRPC over HTTP2](PROTOCOL-HTTP2.md)
|
||||
|
||||
|
|
@ -106,19 +106,6 @@ to security policies with XHR
|
|||
|
||||
# Other features
|
||||
|
||||
Compression
|
||||
|
||||
* Full-body compression is supported and expected for all unary
|
||||
requests/responses. The compression/decompression will be done
|
||||
by browsers, using standard Content-Encoding headers
|
||||
* “grpc-encoding” header is not used
|
||||
* SDCH, Brotli will be supported
|
||||
* Message-level compression for streamed requests/responses is not supported
|
||||
because manual compression/decompression is prohibitively expensive using JS
|
||||
* Per-message compression may be feasible in future with wasm
|
||||
|
||||
---
|
||||
|
||||
Retries, caching
|
||||
|
||||
* Will spec out the support after their respective gRPC spec extensions
|
||||
|
|
@ -128,24 +115,6 @@ are finalized
|
|||
|
||||
---
|
||||
|
||||
Security
|
||||
|
||||
* XSRF, XSS etc to be specified
|
||||
|
||||
---
|
||||
|
||||
CORS preflight
|
||||
|
||||
* Should follow the [CORS spec](https://developer.mozilla.org/en-US/docs/Web/HTTP/Server-Side_Access_Control)
|
||||
* Access-Control-Allow-Credentials to allow Authorization headers
|
||||
* Access-Control-Allow-Methods to allow POST and (preflight) OPTIONS only
|
||||
* Access-Control-Allow-Headers to whatever the preflight request carries
|
||||
* The client library may support header overwrites to avoid preflight
|
||||
* https://github.com/whatwg/fetch/issues/210
|
||||
* CSP support to be specified
|
||||
|
||||
---
|
||||
|
||||
Keep-alive
|
||||
|
||||
* HTTP/2 PING is not supported or used
|
||||
|
|
@ -165,3 +134,8 @@ Versioning
|
|||
|
||||
* Special headers may be introduced to support features that may break compatiblity.
|
||||
|
||||
---
|
||||
|
||||
Browser-specific features
|
||||
|
||||
* For features that are unique to browser or HTML clients, check the [spec doc](https://github.com/grpc/grpc-web/blob/master/PROTOCOL-WEB.md) published in the grpc/grpc-web repo.
|
||||
|
|
|
|||
|
|
@ -49,7 +49,11 @@ some configuration as environment variables that can be set.
|
|||
- connectivity_state - traces connectivity state changes to channels
|
||||
- channel_stack_builder - traces information about channel stacks being built
|
||||
- executor - traces grpc's internal thread pool ('the executor')
|
||||
- fd_trace - traces fd create(), shutdown() and close() calls for channel fds.
|
||||
Also traces epoll fd create()/close() calls in epollex polling engine
|
||||
traces epoll-fd creation/close calls for epollex polling engine
|
||||
- glb - traces the grpclb load balancer
|
||||
- handshaker - traces handshaking state
|
||||
- http - traces state in the http2 transport engine
|
||||
- http2_stream_state - traces all http2 stream state mutations.
|
||||
- http1 - traces HTTP/1.x operations performed by gRPC
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
# Background #
|
||||
|
||||
In Python, multithreading is ineffective at concurrency for CPU bound tasks
|
||||
due to the GIL (global interpreter lock). Extension modules can release
|
||||
the GIL in CPU bound tasks, but that isn't an option in pure Python.
|
||||
Users use libraries such as multiprocessing, subprocess, concurrent.futures.ProcessPoolExecutor,
|
||||
etc, to work around the GIL. These modules call ```fork()``` underneath the hood. Various issues have
|
||||
been reported when using these modules with gRPC Python. gRPC Python wraps
|
||||
gRPC core, which uses multithreading for performance, and hence doesn't support ```fork()```.
|
||||
Historically, we didn't support forking in gRPC, but some users seemed
|
||||
to be doing fine until their code started to break on version 1.6. This was
|
||||
likely caused by the addition of background c-threads and a background
|
||||
Python thread.
|
||||
|
||||
# Current Status #
|
||||
|
||||
## 1.11 ##
|
||||
The background Python thread was removed entirely. This allows forking
|
||||
after creating a channel. However, the channel must not have issued any
|
||||
RPCs prior to the fork. Attempting to fork with an active channel that
|
||||
has been used can result in deadlocks/corrupted wire data.
|
||||
|
||||
## 1.9 ##
|
||||
A regression was noted in cases where users are doing fork/exec. This
|
||||
was due to ```pthread_atfork()``` handler that was added in 1.7 to partially
|
||||
support forking in gRPC. A deadlock can happen when pthread_atfork
|
||||
handler is running, and an application thread is calling into gRPC.
|
||||
We have provided a workaround for this issue by allowing users to turn
|
||||
off the handler using env flag ```GRPC_ENABLE_FORK_SUPPORT=False```.
|
||||
This should be set whenever a user expects to always call exec
|
||||
immediately following fork. It will disable the fork handlers.
|
||||
|
||||
## 1.7 ##
|
||||
A ```pthread_atfork()``` handler was added in 1.7 to automatically shut down
|
||||
the background c-threads when fork was called. This does not shut down the
|
||||
background Python thread, so users could not have any open channels when
|
||||
forking.
|
||||
|
||||
# Future Work #
|
||||
|
||||
## 1.13 ##
|
||||
The workaround when using fork/exec by setting
|
||||
```GRPC_ENABLE_FORK_SUPPORT=False``` should no longer be needed. Following
|
||||
[this PR](https://github.com/grpc/grpc/pull/14647), fork
|
||||
handlers will not automatically run when multiple threads are calling
|
||||
into gRPC.
|
||||
|
|
@ -1,17 +1,15 @@
|
|||
Each version of gRPC gets a new description of what the 'g' stands for, since
|
||||
we've never really been able to figure it out.
|
||||
'g' stands for something different every gRPC release:
|
||||
|
||||
Below is a list of already-used definitions (that should not be repeated in the
|
||||
future), and the corresponding version numbers that used them:
|
||||
|
||||
- 1.0 'g' stands for 'gRPC'
|
||||
- 1.1 'g' stands for 'good'
|
||||
- 1.2 'g' stands for 'green'
|
||||
- 1.3 'g' stands for 'gentle'
|
||||
- 1.4 'g' stands for 'gregarious'
|
||||
- 1.6 'g' stands for 'garcia'
|
||||
- 1.7 'g' stands for 'gambit'
|
||||
- 1.8 'g' stands for 'generous'
|
||||
- 1.9 'g' stands for 'glossy'
|
||||
- 1.10 'g' stands for 'glamorous'
|
||||
- 1.11 'g' stands for 'gorgeous'
|
||||
- 1.0 'g' stands for ['gRPC'](https://github.com/grpc/grpc/tree/v1.0.x)
|
||||
- 1.1 'g' stands for ['good'](https://github.com/grpc/grpc/tree/v1.1.x)
|
||||
- 1.2 'g' stands for ['green'](https://github.com/grpc/grpc/tree/v1.2.x)
|
||||
- 1.3 'g' stands for ['gentle'](https://github.com/grpc/grpc/tree/v1.3.x)
|
||||
- 1.4 'g' stands for ['gregarious'](https://github.com/grpc/grpc/tree/v1.4.x)
|
||||
- 1.6 'g' stands for ['garcia'](https://github.com/grpc/grpc/tree/v1.6.x)
|
||||
- 1.7 'g' stands for ['gambit'](https://github.com/grpc/grpc/tree/v1.7.x)
|
||||
- 1.8 'g' stands for ['generous'](https://github.com/grpc/grpc/tree/v1.8.x)
|
||||
- 1.9 'g' stands for ['glossy'](https://github.com/grpc/grpc/tree/v1.9.x)
|
||||
- 1.10 'g' stands for ['glamorous'](https://github.com/grpc/grpc/tree/v1.10.x)
|
||||
- 1.11 'g' stands for ['gorgeous'](https://github.com/grpc/grpc/tree/v1.11.x)
|
||||
- 1.12 'g' stands for ['glorious'](https://github.com/grpc/grpc/tree/v1.12.x)
|
||||
- 1.13 'g' stands for ['gloriosa'](https://github.com/grpc/grpc/tree/master)
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ Such a mock can be auto-generated by:
|
|||
|
||||
|
||||
1. Setting flag(generate_mock_code=true) on grpc plugin for protoc, or
|
||||
1. Setting an attribute(generate_mock) in your bazel rule.
|
||||
1. Setting an attribute(generate_mocks) in your bazel rule.
|
||||
|
||||
Protoc plugin flag:
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ Bazel rule:
|
|||
grpc_proto_library(
|
||||
name = "echo_proto",
|
||||
srcs = ["echo.proto"],
|
||||
generate_mock = True,
|
||||
generate_mocks = True,
|
||||
)
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -3525,39 +3525,6 @@ AAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3CekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ
|
|||
5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# Issuer: CN=TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5 O=TÜRKTRUST Bilgi İletişim ve Bilişim Güvenliği Hizmetleri A.Ş.
|
||||
# Subject: CN=TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5 O=TÜRKTRUST Bilgi İletişim ve Bilişim Güvenliği Hizmetleri A.Ş.
|
||||
# Label: "TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5"
|
||||
# Serial: 156233699172481
|
||||
# MD5 Fingerprint: da:70:8e:f0:22:df:93:26:f6:5f:9f:d3:15:06:52:4e
|
||||
# SHA1 Fingerprint: c4:18:f6:4d:46:d1:df:00:3d:27:30:13:72:43:a9:12:11:c6:75:fb
|
||||
# SHA256 Fingerprint: 49:35:1b:90:34:44:c1:85:cc:dc:5c:69:3d:24:d8:55:5c:b2:08:d6:a8:14:13:07:69:9f:4a:f0:63:19:9d:78
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEJzCCAw+gAwIBAgIHAI4X/iQggTANBgkqhkiG9w0BAQsFADCBsTELMAkGA1UE
|
||||
BhMCVFIxDzANBgNVBAcMBkFua2FyYTFNMEsGA1UECgxEVMOcUktUUlVTVCBCaWxn
|
||||
aSDEsGxldGnFn2ltIHZlIEJpbGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkg
|
||||
QS7Fni4xQjBABgNVBAMMOVTDnFJLVFJVU1QgRWxla3Ryb25payBTZXJ0aWZpa2Eg
|
||||
SGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSBINTAeFw0xMzA0MzAwODA3MDFaFw0yMzA0
|
||||
MjgwODA3MDFaMIGxMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMU0wSwYD
|
||||
VQQKDERUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8
|
||||
dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLjFCMEAGA1UEAww5VMOcUktUUlVTVCBF
|
||||
bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIEg1MIIB
|
||||
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApCUZ4WWe60ghUEoI5RHwWrom
|
||||
/4NZzkQqL/7hzmAD/I0Dpe3/a6i6zDQGn1k19uwsu537jVJp45wnEFPzpALFp/kR
|
||||
Gml1bsMdi9GYjZOHp3GXDSHHmflS0yxjXVW86B8BSLlg/kJK9siArs1mep5Fimh3
|
||||
4khon6La8eHBEJ/rPCmBp+EyCNSgBbGM+42WAA4+Jd9ThiI7/PS98wl+d+yG6w8z
|
||||
5UNP9FR1bSmZLmZaQ9/LXMrI5Tjxfjs1nQ/0xVqhzPMggCTTV+wVunUlm+hkS7M0
|
||||
hO8EuPbJbKoCPrZV4jI3X/xml1/N1p7HIL9Nxqw/dV8c7TKcfGkAaZHjIxhT6QID
|
||||
AQABo0IwQDAdBgNVHQ4EFgQUVpkHHtOsDGlktAxQR95DLL4gwPswDgYDVR0PAQH/
|
||||
BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAJ5FdnsX
|
||||
SDLyOIspve6WSk6BGLFRRyDN0GSxDsnZAdkJzsiZ3GglE9Rc8qPoBP5yCccLqh0l
|
||||
VX6Wmle3usURehnmp349hQ71+S4pL+f5bFgWV1Al9j4uPqrtd3GqqpmWRgqujuwq
|
||||
URawXs3qZwQcWDD1YIq9pr1N5Za0/EKJAWv2cMhQOQwt1WbZyNKzMrcbGW3LM/nf
|
||||
peYVhDfwwvJllpKQd/Ct9JDpEXjXk4nAPQu6KfTomZ1yju2dL+6SfaHx/126M2CF
|
||||
Yv4HAqGEVka+lgqaE9chTLd8B59OTj+RdPsnnRHM3eaxynFNExc5JsUpISuTKWqW
|
||||
+qtB4Uu2NQvAmxU=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# Issuer: CN=Certinomis - Root CA O=Certinomis OU=0002 433998903
|
||||
# Subject: CN=Certinomis - Root CA O=Certinomis OU=0002 433998903
|
||||
# Label: "Certinomis - Root CA"
|
||||
|
|
|
|||
|
|
@ -12,36 +12,6 @@ file(MAKE_DIRECTORY ${GRPC_BUILD_DIR})
|
|||
|
||||
add_subdirectory(${GRPC_SRC_DIR} ${GRPC_BUILD_DIR})
|
||||
|
||||
include_directories(${GRPC_SRC_DIR}/include)
|
||||
|
||||
add_library(libgrpc STATIC IMPORTED)
|
||||
set_target_properties(libgrpc PROPERTIES IMPORTED_LOCATION
|
||||
${GRPC_BUILD_DIR}/libgrpc.a)
|
||||
|
||||
add_library(libgrpc++ STATIC IMPORTED)
|
||||
set_target_properties(libgrpc++ PROPERTIES IMPORTED_LOCATION
|
||||
${GRPC_BUILD_DIR}/libgrpc++.a)
|
||||
|
||||
add_library(libgpr STATIC IMPORTED)
|
||||
set_target_properties(libgpr PROPERTIES IMPORTED_LOCATION
|
||||
${GRPC_BUILD_DIR}/libgpr.a)
|
||||
|
||||
add_library(libcares STATIC IMPORTED)
|
||||
set_target_properties(libcares PROPERTIES IMPORTED_LOCATION
|
||||
${GRPC_BUILD_DIR}/third_party/cares/cares/lib/libcares.a)
|
||||
|
||||
add_library(libzlib STATIC IMPORTED)
|
||||
set_target_properties(libzlib PROPERTIES IMPORTED_LOCATION
|
||||
${GRPC_BUILD_DIR}/third_party/zlib/libz.a)
|
||||
|
||||
add_library(libcrypto STATIC IMPORTED)
|
||||
set_target_properties(libcrypto PROPERTIES IMPORTED_LOCATION
|
||||
${GRPC_BUILD_DIR}/third_party/boringssl/crypto/libcrypto.a)
|
||||
|
||||
add_library(libssl STATIC IMPORTED)
|
||||
set_target_properties(libssl PROPERTIES IMPORTED_LOCATION
|
||||
${GRPC_BUILD_DIR}/third_party/boringssl/ssl/libssl.a)
|
||||
|
||||
set(GRPC_PROTO_GENS_DIR ${CMAKE_BINARY_DIR}/gens)
|
||||
file(MAKE_DIRECTORY ${GRPC_PROTO_GENS_DIR})
|
||||
include_directories(${GRPC_PROTO_GENS_DIR})
|
||||
|
|
@ -96,8 +66,8 @@ add_library(helloworld_proto_lib
|
|||
SHARED ${HELLOWORLD_PROTO_HDRS} ${HELLOWORLD_PROTO_SRCS})
|
||||
|
||||
target_link_libraries(helloworld_proto_lib
|
||||
grpc++
|
||||
libprotobuf
|
||||
libgrpc++
|
||||
android
|
||||
log)
|
||||
|
||||
|
|
@ -111,13 +81,6 @@ target_include_directories(grpc-helloworld
|
|||
PRIVATE ${HELLOWORLD_PROTO_HEADERS})
|
||||
|
||||
target_link_libraries(grpc-helloworld
|
||||
libgrpc++
|
||||
libgrpc
|
||||
libzlib
|
||||
libcares
|
||||
libssl
|
||||
libcrypto
|
||||
helloworld_proto_lib
|
||||
libgpr
|
||||
android
|
||||
${log-lib})
|
||||
|
|
|
|||
|
|
@ -11,6 +11,13 @@ android {
|
|||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
// The paths to the protoc and grpc_cpp_plugin binaries on the host system (codegen
|
||||
// is not cross-compiled to Android)
|
||||
def protoc = project.hasProperty('protoc') ?
|
||||
project.property('protoc') : '/usr/local/bin/protoc'
|
||||
def grpc_cpp_plugin = project.hasProperty('grpc_cpp_plugin') ?
|
||||
project.property('grpc_cpp_plugin') : '/usr/local/bin/grpc_cpp_plugin'
|
||||
|
||||
cppFlags "-std=c++14 -frtti -fexceptions"
|
||||
arguments '-DANDROID_STL=c++_static'
|
||||
arguments '-DRUN_HAVE_POSIX_REGEX=0'
|
||||
|
|
@ -18,12 +25,8 @@ android {
|
|||
arguments '-DRUN_HAVE_STEADY_CLOCK=0'
|
||||
arguments '-Dprotobuf_BUILD_PROTOC_BINARIES=off'
|
||||
arguments '-DgRPC_BUILD_CODEGEN=off'
|
||||
// Set this to the path to the protoc binary on the host system (codegen is not
|
||||
// cross-compiled to Android)
|
||||
arguments '-Dhelloworld_PROTOBUF_PROTOC_EXECUTABLE=/usr/local/bin/protoc'
|
||||
// Set this to the path to the gRPC C++ protoc plugin binary on the host system
|
||||
// (codegen is not cross-compiled to Android)
|
||||
arguments '-Dhelloworld_GRPC_CPP_PLUGIN_EXECUTABLE=/usr/local/bin/grpc_cpp_plugin'
|
||||
arguments '-Dhelloworld_PROTOBUF_PROTOC_EXECUTABLE=' + protoc
|
||||
arguments '-Dhelloworld_GRPC_CPP_PLUGIN_EXECUTABLE=' + grpc_cpp_plugin
|
||||
}
|
||||
}
|
||||
ndk.abiFilters 'x86'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,24 @@
|
|||
# Minimum CMake required
|
||||
# Copyright 2018 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# cmake build file for C++ helloworld example.
|
||||
# Assumes protobuf and gRPC have been installed using cmake.
|
||||
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
|
||||
# that automatically builds all the dependencies before building helloworld.
|
||||
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
# Project
|
||||
project(HelloWorld C CXX)
|
||||
|
||||
if(NOT MSVC)
|
||||
|
|
@ -10,57 +27,76 @@ else()
|
|||
add_definitions(-D_WIN32_WINNT=0x600)
|
||||
endif()
|
||||
|
||||
# Protobuf
|
||||
# NOTE: we cannot use "CONFIG" mode here because protobuf-config.cmake
|
||||
# is broken when used with CMAKE_INSTALL_PREFIX
|
||||
find_package(Protobuf REQUIRED)
|
||||
message(STATUS "Using protobuf ${protobuf_VERSION}")
|
||||
|
||||
# {Protobuf,PROTOBUF}_FOUND is defined based on find_package type ("MODULE" vs "CONFIG").
|
||||
# For "MODULE", the case has also changed between cmake 3.5 and 3.6.
|
||||
# We use the legacy uppercase version for *_LIBRARIES AND *_INCLUDE_DIRS variables
|
||||
# as newer cmake versions provide them too for backward compatibility.
|
||||
if(Protobuf_FOUND OR PROTOBUF_FOUND)
|
||||
if(TARGET protobuf::libprotobuf)
|
||||
set(_PROTOBUF_LIBPROTOBUF protobuf::libprotobuf)
|
||||
else()
|
||||
set(_PROTOBUF_LIBPROTOBUF ${PROTOBUF_LIBRARIES})
|
||||
include_directories(${PROTOBUF_INCLUDE_DIRS})
|
||||
endif()
|
||||
if(TARGET protobuf::protoc)
|
||||
set(_PROTOBUF_PROTOC $<TARGET_FILE:protobuf::protoc>)
|
||||
else()
|
||||
set(_PROTOBUF_PROTOC ${PROTOBUF_PROTOC_EXECUTABLE})
|
||||
endif()
|
||||
if(GRPC_AS_SUBMODULE)
|
||||
# One way to build a projects that uses gRPC is to just include the
|
||||
# entire gRPC project tree via "add_subdirectory".
|
||||
# This approach is very simple to use, but the are some potential
|
||||
# disadvantages:
|
||||
# * it includes gRPC's CMakeLists.txt directly into your build script
|
||||
# without and that can make gRPC's internal setting interfere with your
|
||||
# own build.
|
||||
# * depending on what's installed on your system, the contents of submodules
|
||||
# in gRPC's third_party/* might need to be available (and there might be
|
||||
# additional prerequisites required to build them). Consider using
|
||||
# the gRPC_*_PROVIDER options to fine-tune the expected behavior.
|
||||
#
|
||||
# A more robust approach to add dependency on gRPC is using
|
||||
# cmake's ExternalProject_Add (see cmake_externalproject/CMakeLists.txt).
|
||||
|
||||
# Include the gRPC's cmake build (normally grpc source code would live
|
||||
# in a git submodule called "third_party/grpc", but this example lives in
|
||||
# the same repository as gRPC sources, so we just look a few directories up)
|
||||
add_subdirectory(../../.. ${CMAKE_CURRENT_BINARY_DIR}/grpc EXCLUDE_FROM_ALL)
|
||||
message(STATUS "Using gRPC via add_subdirectory.")
|
||||
|
||||
# After using add_subdirectory, we can now use the grpc targets directly from
|
||||
# this build.
|
||||
set(_PROTOBUF_LIBPROTOBUF libprotobuf)
|
||||
set(_PROTOBUF_PROTOC $<TARGET_FILE:protoc>)
|
||||
set(_GRPC_GRPCPP_UNSECURE grpc++_unsecure)
|
||||
set(_GRPC_CPP_PLUGIN_EXECUTABLE $<TARGET_FILE:grpc_cpp_plugin>)
|
||||
else()
|
||||
message(WARNING "Failed to locate libprotobuf and protoc!")
|
||||
# This branch assumes that gRPC and all its dependencies are already installed
|
||||
# on this system, so they can be located by find_package().
|
||||
|
||||
# Find Protobuf installation
|
||||
# Looks for protobuf-config.cmake file installed by Protobuf's cmake installation.
|
||||
set(protobuf_MODULE_COMPATIBLE TRUE)
|
||||
find_package(Protobuf CONFIG REQUIRED)
|
||||
message(STATUS "Using protobuf ${protobuf_VERSION}")
|
||||
|
||||
set(_PROTOBUF_LIBPROTOBUF protobuf::libprotobuf)
|
||||
set(_PROTOBUF_PROTOC $<TARGET_FILE:protobuf::protoc>)
|
||||
|
||||
# Find gRPC installation
|
||||
# Looks for gRPCConfig.cmake file installed by gRPC's cmake installation.
|
||||
find_package(gRPC CONFIG REQUIRED)
|
||||
message(STATUS "Using gRPC ${gRPC_VERSION}")
|
||||
|
||||
set(_GRPC_GRPCPP_UNSECURE gRPC::grpc++_unsecure)
|
||||
set(_GRPC_CPP_PLUGIN_EXECUTABLE $<TARGET_FILE:gRPC::grpc_cpp_plugin>)
|
||||
endif()
|
||||
|
||||
# gRPC
|
||||
find_package(gRPC CONFIG REQUIRED)
|
||||
message(STATUS "Using gRPC ${gRPC_VERSION}")
|
||||
|
||||
# gRPC C++ plugin
|
||||
get_target_property(gRPC_CPP_PLUGIN_EXECUTABLE gRPC::grpc_cpp_plugin
|
||||
IMPORTED_LOCATION_RELEASE)
|
||||
|
||||
# Proto file
|
||||
get_filename_component(hw_proto "../../protos/helloworld.proto" ABSOLUTE)
|
||||
get_filename_component(hw_proto_path "${hw_proto}" PATH)
|
||||
|
||||
# Generated sources
|
||||
protobuf_generate_cpp(hw_proto_srcs hw_proto_hdrs "${hw_proto}")
|
||||
set(hw_proto_srcs "${CMAKE_CURRENT_BINARY_DIR}/helloworld.pb.cc")
|
||||
set(hw_proto_hdrs "${CMAKE_CURRENT_BINARY_DIR}/helloworld.pb.h")
|
||||
set(hw_grpc_srcs "${CMAKE_CURRENT_BINARY_DIR}/helloworld.grpc.pb.cc")
|
||||
set(hw_grpc_hdrs "${CMAKE_CURRENT_BINARY_DIR}/helloworld.grpc.pb.h")
|
||||
add_custom_command(
|
||||
OUTPUT "${hw_grpc_srcs}" "${hw_grpc_hdrs}"
|
||||
OUTPUT "${hw_proto_srcs}" "${hw_proto_hdrs}" "${hw_grpc_srcs}" "${hw_grpc_hdrs}"
|
||||
COMMAND ${_PROTOBUF_PROTOC}
|
||||
ARGS --grpc_out "${CMAKE_CURRENT_BINARY_DIR}" -I "${hw_proto_path}"
|
||||
--plugin=protoc-gen-grpc="${gRPC_CPP_PLUGIN_EXECUTABLE}"
|
||||
ARGS --grpc_out "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
--cpp_out "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
-I "${hw_proto_path}"
|
||||
--plugin=protoc-gen-grpc="${_GRPC_CPP_PLUGIN_EXECUTABLE}"
|
||||
"${hw_proto}"
|
||||
DEPENDS "${hw_proto}")
|
||||
|
||||
# Generated include directory
|
||||
# Include generated *.pb.h files
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
# Targets greeter_[async_](client|server)
|
||||
|
|
@ -71,6 +107,6 @@ foreach(_target
|
|||
${hw_proto_srcs}
|
||||
${hw_grpc_srcs})
|
||||
target_link_libraries(${_target}
|
||||
${_PROTOBUF_LIBPROTOBUF}
|
||||
gRPC::grpc++_unsecure)
|
||||
${_GRPC_GRPCPP_UNSECURE}
|
||||
${_PROTOBUF_LIBPROTOBUF})
|
||||
endforeach()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,116 @@
|
|||
# Copyright 2018 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# cmake "superbuild" file for C++ helloworld example.
|
||||
# This build file demonstrates how to build the helloworld project
|
||||
# and all its dependencies in a single cmake build (hence "superbuild")
|
||||
# that is easy to build and maintain.
|
||||
# cmake's ExternalProject_Add() is used to import all the sub-projects,
|
||||
# including the "helloworld" project itself.
|
||||
# See https://blog.kitware.com/cmake-superbuilds-git-submodules/
|
||||
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
# Project
|
||||
project(HelloWorld-SuperBuild C CXX)
|
||||
|
||||
include(ExternalProject)
|
||||
|
||||
# Builds c-ares project from the git submodule.
|
||||
# Note: For all external projects, instead of using checked-out code, one could
|
||||
# specify GIT_REPOSITORY and GIT_TAG to have cmake download the dependency directly,
|
||||
# without needing to add a submodule to your project.
|
||||
ExternalProject_Add(c-ares
|
||||
PREFIX c-ares
|
||||
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../third_party/cares/cares"
|
||||
CMAKE_CACHE_ARGS
|
||||
-DCARES_SHARED:BOOL=OFF
|
||||
-DCARES_STATIC:BOOL=ON
|
||||
-DCARES_STATIC_PIC:BOOL=ON
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/c-ares
|
||||
)
|
||||
|
||||
# Builds protobuf project from the git submodule.
|
||||
ExternalProject_Add(protobuf
|
||||
PREFIX protobuf
|
||||
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../third_party/protobuf/cmake"
|
||||
CMAKE_CACHE_ARGS
|
||||
-Dprotobuf_BUILD_TESTS:BOOL=OFF
|
||||
-Dprotobuf_WITH_ZLIB:BOOL=OFF
|
||||
-Dprotobuf_MSVC_STATIC_RUNTIME:BOOL=OFF
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/protobuf
|
||||
)
|
||||
|
||||
# Builds zlib project from the git submodule.
|
||||
ExternalProject_Add(zlib
|
||||
PREFIX zlib
|
||||
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../third_party/zlib"
|
||||
CMAKE_CACHE_ARGS
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/zlib
|
||||
)
|
||||
|
||||
# the location where protobuf-config.cmake will be installed varies by platform
|
||||
if (WIN32)
|
||||
set(_FINDPACKAGE_PROTOBUF_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/protobuf/cmake")
|
||||
else()
|
||||
set(_FINDPACKAGE_PROTOBUF_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/protobuf/lib/cmake/protobuf")
|
||||
endif()
|
||||
|
||||
# if OPENSSL_ROOT_DIR is set, propagate that hint path to the external projects with OpenSSL dependency.
|
||||
set(_CMAKE_ARGS_OPENSSL_ROOT_DIR "")
|
||||
if (OPENSSL_ROOT_DIR)
|
||||
set(_CMAKE_ARGS_OPENSSL_ROOT_DIR "-DOPENSSL_ROOT_DIR:PATH=${OPENSSL_ROOT_DIR}")
|
||||
endif()
|
||||
|
||||
# Builds gRPC based on locally checked-out sources and set arguments so that all the dependencies
|
||||
# are correctly located.
|
||||
ExternalProject_Add(grpc
|
||||
PREFIX grpc
|
||||
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../.."
|
||||
CMAKE_CACHE_ARGS
|
||||
-DgRPC_INSTALL:BOOL=ON
|
||||
-DgRPC_BUILD_TESTS:BOOL=OFF
|
||||
-DgRPC_PROTOBUF_PROVIDER:STRING=package
|
||||
-DgRPC_PROTOBUF_PACKAGE_TYPE:STRING=CONFIG
|
||||
-DProtobuf_DIR:PATH=${_FINDPACKAGE_PROTOBUF_CONFIG_DIR}
|
||||
-DgRPC_ZLIB_PROVIDER:STRING=package
|
||||
-DZLIB_ROOT:STRING=${CMAKE_CURRENT_BINARY_DIR}/zlib
|
||||
-DgRPC_CARES_PROVIDER:STRING=package
|
||||
-Dc-ares_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/c-ares/lib/cmake/c-ares
|
||||
-DgRPC_SSL_PROVIDER:STRING=package
|
||||
${_CMAKE_ARGS_OPENSSL_ROOT_DIR}
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/grpc
|
||||
DEPENDS c-ares protobuf zlib
|
||||
)
|
||||
|
||||
# Build the helloworld projects itself using a CMakeLists.txt that assumes all the dependencies
|
||||
# have already been installed.
|
||||
# Even though helloworld is not really an "external project" from perspective of this build,
|
||||
# we are still importing it using ExternalProject_Add because that allows us to use find_package()
|
||||
# to locate all the dependencies (if we were building helloworld directly in this build we,
|
||||
# we would have needed to manually import the libraries as opposed to reusing targets exported by
|
||||
# gRPC and protobuf).
|
||||
ExternalProject_Add(helloworld
|
||||
PREFIX helloworld
|
||||
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/.."
|
||||
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/helloworld"
|
||||
INSTALL_COMMAND ""
|
||||
CMAKE_CACHE_ARGS
|
||||
-DProtobuf_DIR:PATH=${_FINDPACKAGE_PROTOBUF_CONFIG_DIR}
|
||||
-Dc-ares_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/c-ares/lib/cmake/c-ares
|
||||
-DZLIB_ROOT:STRING=${CMAKE_CURRENT_BINARY_DIR}/zlib
|
||||
${_CMAKE_ARGS_OPENSSL_ROOT_DIR}
|
||||
-DgRPC_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/grpc/lib/cmake/grpc
|
||||
DEPENDS protobuf grpc
|
||||
)
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <grpc++/grpc++.h>
|
||||
#include <grpcpp/grpcpp.h>
|
||||
#include <grpc/support/log.h>
|
||||
|
||||
#include "helloworld.grpc.pb.h"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <grpc++/grpc++.h>
|
||||
#include <grpcpp/grpcpp.h>
|
||||
#include <grpc/support/log.h>
|
||||
#include <thread>
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
#include <grpc++/grpc++.h>
|
||||
#include <grpcpp/grpcpp.h>
|
||||
#include <grpc/support/log.h>
|
||||
|
||||
#include "helloworld.grpc.pb.h"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <grpc++/grpc++.h>
|
||||
#include <grpcpp/grpcpp.h>
|
||||
|
||||
#ifdef BAZEL_BUILD
|
||||
#include "examples/protos/helloworld.grpc.pb.h"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <grpc++/grpc++.h>
|
||||
#include <grpcpp/grpcpp.h>
|
||||
|
||||
#ifdef BAZEL_BUILD
|
||||
#include "examples/protos/helloworld.grpc.pb.h"
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@
|
|||
#include <thread>
|
||||
|
||||
#include <grpc/grpc.h>
|
||||
#include <grpc++/channel.h>
|
||||
#include <grpc++/client_context.h>
|
||||
#include <grpc++/create_channel.h>
|
||||
#include <grpc++/security/credentials.h>
|
||||
#include <grpcpp/channel.h>
|
||||
#include <grpcpp/client_context.h>
|
||||
#include <grpcpp/create_channel.h>
|
||||
#include <grpcpp/security/credentials.h>
|
||||
#include "helper.h"
|
||||
#include "route_guide.grpc.pb.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@
|
|||
#include <string>
|
||||
|
||||
#include <grpc/grpc.h>
|
||||
#include <grpc++/server.h>
|
||||
#include <grpc++/server_builder.h>
|
||||
#include <grpc++/server_context.h>
|
||||
#include <grpc++/security/server_credentials.h>
|
||||
#include <grpcpp/server.h>
|
||||
#include <grpcpp/server_builder.h>
|
||||
#include <grpcpp/server_context.h>
|
||||
#include <grpcpp/security/server_credentials.h>
|
||||
#include "helper.h"
|
||||
#include "route_guide.grpc.pb.h"
|
||||
|
||||
|
|
@ -51,6 +51,7 @@ float ConvertToRadians(float num) {
|
|||
return num * 3.1415926 /180;
|
||||
}
|
||||
|
||||
// The formula is based on http://mathforum.org/library/drmath/view/51879.html
|
||||
float GetDistance(const Point& start, const Point& end) {
|
||||
const float kCoordFactor = 10000000.0;
|
||||
float lat_1 = start.latitude() / kCoordFactor;
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"sdk": {
|
||||
"version": "1.0.0"
|
||||
}
|
||||
}
|
||||
|
|
@ -52,26 +52,23 @@ namespace Routeguide
|
|||
|
||||
/// <summary>
|
||||
/// Calculate the distance between two points using the "haversine" formula.
|
||||
/// This code was taken from http://www.movable-type.co.uk/scripts/latlong.html.
|
||||
/// The formula is based on http://mathforum.org/library/drmath/view/51879.html
|
||||
/// </summary>
|
||||
/// <param name="start">the starting point</param>
|
||||
/// <param name="end">the end point</param>
|
||||
/// <returns>the distance between the points in meters</returns>
|
||||
public static double GetDistance(this Point start, Point end)
|
||||
{
|
||||
double lat1 = start.GetLatitude();
|
||||
double lat2 = end.GetLatitude();
|
||||
double lon1 = start.GetLongitude();
|
||||
double lon2 = end.GetLongitude();
|
||||
int r = 6371000; // metres
|
||||
double phi1 = ToRadians(lat1);
|
||||
double phi2 = ToRadians(lat2);
|
||||
double deltaPhi = ToRadians(lat2 - lat1);
|
||||
double deltaLambda = ToRadians(lon2 - lon1);
|
||||
int r = 6371000; // earth radius in metres
|
||||
double lat1 = ToRadians(start.GetLatitude());
|
||||
double lat2 = ToRadians(end.GetLatitude());
|
||||
double lon1 = ToRadians(start.GetLongitude());
|
||||
double lon2 = ToRadians(end.GetLongitude());
|
||||
double deltalat = lat2 - lat1;
|
||||
double deltalon = lon2 - lon1;
|
||||
|
||||
double a = Math.Sin(deltaPhi / 2) * Math.Sin(deltaPhi / 2) + Math.Cos(phi1) * Math.Cos(phi2) * Math.Sin(deltaLambda / 2) * Math.Sin(deltaLambda / 2);
|
||||
double a = Math.Sin(deltalat / 2) * Math.Sin(deltalat / 2) + Math.Cos(lat1) * Math.Cos(lat2) * Math.Sin(deltalon / 2) * Math.Sin(deltalon / 2);
|
||||
double c = 2 * Math.Atan2(Math.Sqrt(a), Math.Sqrt(1 - a));
|
||||
|
||||
return r * c;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ function listFeatures(call) {
|
|||
|
||||
/**
|
||||
* Calculate the distance between two points using the "haversine" formula.
|
||||
* This code was taken from http://www.movable-type.co.uk/scripts/latlong.html.
|
||||
* The formula is based on http://mathforum.org/library/drmath/view/51879.html.
|
||||
* @param start The starting point
|
||||
* @param end The end point
|
||||
* @return The distance between the points in meters
|
||||
|
|
@ -112,21 +112,18 @@ function getDistance(start, end) {
|
|||
function toRadians(num) {
|
||||
return num * Math.PI / 180;
|
||||
}
|
||||
var lat1 = start.latitude / COORD_FACTOR;
|
||||
var lat2 = end.latitude / COORD_FACTOR;
|
||||
var lon1 = start.longitude / COORD_FACTOR;
|
||||
var lon2 = end.longitude / COORD_FACTOR;
|
||||
var R = 6371000; // metres
|
||||
var φ1 = toRadians(lat1);
|
||||
var φ2 = toRadians(lat2);
|
||||
var Δφ = toRadians(lat2-lat1);
|
||||
var Δλ = toRadians(lon2-lon1);
|
||||
var R = 6371000; // earth radius in metres
|
||||
var lat1 = toRadians(start.latitude / COORD_FACTOR);
|
||||
var lat2 = toRadians(end.latitude / COORD_FACTOR);
|
||||
var lon1 = toRadians(start.longitude / COORD_FACTOR);
|
||||
var lon2 = toRadians(end.longitude / COORD_FACTOR);
|
||||
|
||||
var a = Math.sin(Δφ/2) * Math.sin(Δφ/2) +
|
||||
Math.cos(φ1) * Math.cos(φ2) *
|
||||
Math.sin(Δλ/2) * Math.sin(Δλ/2);
|
||||
var deltalat = lat2-lat1;
|
||||
var deltalon = lon2-lon1;
|
||||
var a = Math.sin(deltalat/2) * Math.sin(deltalat/2) +
|
||||
Math.cos(lat1) * Math.cos(lat2) *
|
||||
Math.sin(deltalon/2) * Math.sin(deltalon/2);
|
||||
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
|
||||
|
||||
return R * c;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ function listFeatures(call) {
|
|||
|
||||
/**
|
||||
* Calculate the distance between two points using the "haversine" formula.
|
||||
* This code was taken from http://www.movable-type.co.uk/scripts/latlong.html.
|
||||
* The formula is based on http://mathforum.org/library/drmath/view/51879.html.
|
||||
* @param start The starting point
|
||||
* @param end The end point
|
||||
* @return The distance between the points in meters
|
||||
|
|
@ -111,21 +111,18 @@ function getDistance(start, end) {
|
|||
function toRadians(num) {
|
||||
return num * Math.PI / 180;
|
||||
}
|
||||
var lat1 = start.getLatitude() / COORD_FACTOR;
|
||||
var lat2 = end.getLatitude() / COORD_FACTOR;
|
||||
var lon1 = start.getLongitude() / COORD_FACTOR;
|
||||
var lon2 = end.getLongitude() / COORD_FACTOR;
|
||||
var R = 6371000; // metres
|
||||
var φ1 = toRadians(lat1);
|
||||
var φ2 = toRadians(lat2);
|
||||
var Δφ = toRadians(lat2-lat1);
|
||||
var Δλ = toRadians(lon2-lon1);
|
||||
var R = 6371000; // earth radius in metres
|
||||
var lat1 = toRadians(start.getLatitude() / COORD_FACTOR);
|
||||
var lat2 = toRadians(end.getLatitude() / COORD_FACTOR);
|
||||
var lon1 = toRadians(start.getLongitude() / COORD_FACTOR);
|
||||
var lon2 = toRadians(end.getLongitude() / COORD_FACTOR);
|
||||
|
||||
var a = Math.sin(Δφ/2) * Math.sin(Δφ/2) +
|
||||
Math.cos(φ1) * Math.cos(φ2) *
|
||||
Math.sin(Δλ/2) * Math.sin(Δλ/2);
|
||||
var deltalat = lat2-lat1;
|
||||
var deltalon = lon2-lon1;
|
||||
var a = Math.sin(deltalat/2) * Math.sin(deltalat/2) +
|
||||
Math.cos(lat1) * Math.cos(lat2) *
|
||||
Math.sin(deltalon/2) * Math.sin(deltalon/2);
|
||||
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
|
||||
|
||||
return R * c;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ def get_distance(start, end):
|
|||
delta_lat_rad = math.radians(lat_2 - lat_1)
|
||||
delta_lon_rad = math.radians(lon_2 - lon_1)
|
||||
|
||||
# Formula is based on http://mathforum.org/library/drmath/view/51879.html
|
||||
a = (pow(math.sin(delta_lat_rad / 2), 2) +
|
||||
(math.cos(lat_rad_1) * math.cos(lat_rad_2) * pow(
|
||||
math.sin(delta_lon_rad / 2), 2)))
|
||||
|
|
|
|||
|
|
@ -32,19 +32,18 @@ COORD_FACTOR = 1e7
|
|||
RADIUS = 637_100
|
||||
|
||||
# Determines the distance between two points.
|
||||
# The formula is based on http://mathforum.org/library/drmath/view/51879.html.
|
||||
def calculate_distance(point_a, point_b)
|
||||
to_radians = proc { |x| x * Math::PI / 180 }
|
||||
lat_a = point_a.latitude / COORD_FACTOR
|
||||
lat_b = point_b.latitude / COORD_FACTOR
|
||||
long_a = point_a.longitude / COORD_FACTOR
|
||||
long_b = point_b.longitude / COORD_FACTOR
|
||||
φ1 = to_radians.call(lat_a)
|
||||
φ2 = to_radians.call(lat_b)
|
||||
Δφ = to_radians.call(lat_a - lat_b)
|
||||
Δλ = to_radians.call(long_a - long_b)
|
||||
a = Math.sin(Δφ / 2)**2 +
|
||||
Math.cos(φ1) * Math.cos(φ2) +
|
||||
Math.sin(Δλ / 2)**2
|
||||
lat_a = to_radians.call(point_a.latitude / COORD_FACTOR)
|
||||
lat_b = to_radians.call(point_b.latitude / COORD_FACTOR)
|
||||
lon_a = to_radians.call(point_a.longitude / COORD_FACTOR)
|
||||
lon_b = to_radians.call(point_b.longitude / COORD_FACTOR)
|
||||
delta_lat = lat_a - lat_b
|
||||
delta_lon = lon_a - lon_b
|
||||
a = Math.sin(delta_lat / 2)**2 +
|
||||
Math.cos(lat_a) * Math.cos(lat_b) +
|
||||
Math.sin(delta_lon / 2)**2
|
||||
(2 * RADIUS * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a))).to_i
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'gRPC-C++'
|
||||
# TODO (mxyan): use version that match gRPC version when pod is stabilized
|
||||
# version = '1.11.0-dev'
|
||||
# version = '1.13.0-dev'
|
||||
version = '0.0.2'
|
||||
s.version = version
|
||||
s.summary = 'gRPC C++ library'
|
||||
|
|
@ -31,7 +31,7 @@ Pod::Spec.new do |s|
|
|||
s.license = 'Apache License, Version 2.0'
|
||||
s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' }
|
||||
|
||||
grpc_version = '1.11.0-dev'
|
||||
grpc_version = '1.13.0-dev'
|
||||
|
||||
s.source = {
|
||||
:git => 'https://github.com/grpc/grpc.git',
|
||||
|
|
@ -112,6 +112,8 @@ Pod::Spec.new do |s|
|
|||
'include/grpcpp/support/byte_buffer.h',
|
||||
'include/grpcpp/support/channel_arguments.h',
|
||||
'include/grpcpp/support/config.h',
|
||||
'include/grpcpp/support/proto_buffer_reader.h',
|
||||
'include/grpcpp/support/proto_buffer_writer.h',
|
||||
'include/grpcpp/support/slice.h',
|
||||
'include/grpcpp/support/status.h',
|
||||
'include/grpcpp/support/status_code_enum.h',
|
||||
|
|
@ -206,7 +208,6 @@ Pod::Spec.new do |s|
|
|||
'src/cpp/server/server_posix.cc',
|
||||
'src/cpp/thread_manager/thread_manager.cc',
|
||||
'src/cpp/util/byte_buffer_cc.cc',
|
||||
'src/cpp/util/slice_cc.cc',
|
||||
'src/cpp/util/status.cc',
|
||||
'src/cpp/util/string_ref.cc',
|
||||
'src/cpp/util/time_cc.cc',
|
||||
|
|
@ -259,6 +260,7 @@ Pod::Spec.new do |s|
|
|||
'src/core/ext/filters/http/client/http_client_filter.h',
|
||||
'src/core/ext/filters/http/message_compress/message_compress_filter.h',
|
||||
'src/core/ext/filters/http/server/http_server_filter.h',
|
||||
'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h',
|
||||
'src/core/lib/security/context/security_context.h',
|
||||
'src/core/lib/security/credentials/alts/alts_credentials.h',
|
||||
'src/core/lib/security/credentials/composite/composite_credentials.h',
|
||||
|
|
@ -306,8 +308,8 @@ Pod::Spec.new do |s|
|
|||
'src/core/tsi/alts/handshaker/handshaker.pb.h',
|
||||
'src/core/tsi/alts/handshaker/transport_security_common.pb.h',
|
||||
'src/core/tsi/transport_security.h',
|
||||
'src/core/tsi/transport_security_adapter.h',
|
||||
'src/core/tsi/transport_security_interface.h',
|
||||
'src/core/ext/transport/chttp2/client/authority.h',
|
||||
'src/core/ext/transport/chttp2/client/chttp2_connector.h',
|
||||
'src/core/ext/filters/client_channel/backup_poller.h',
|
||||
'src/core/ext/filters/client_channel/client_channel.h',
|
||||
|
|
@ -326,13 +328,14 @@ Pod::Spec.new do |s|
|
|||
'src/core/ext/filters/client_channel/resolver_factory.h',
|
||||
'src/core/ext/filters/client_channel/resolver_registry.h',
|
||||
'src/core/ext/filters/client_channel/retry_throttle.h',
|
||||
'src/core/ext/filters/client_channel/status_util.h',
|
||||
'src/core/ext/filters/client_channel/subchannel.h',
|
||||
'src/core/ext/filters/client_channel/subchannel_index.h',
|
||||
'src/core/ext/filters/client_channel/uri_parser.h',
|
||||
'src/core/ext/filters/deadline/deadline_filter.h',
|
||||
'src/core/tsi/alts_transport_security.h',
|
||||
'src/core/tsi/fake_transport_security.h',
|
||||
'src/core/tsi/ssl/session_cache/ssl_session.h',
|
||||
'src/core/tsi/ssl/session_cache/ssl_session_cache.h',
|
||||
'src/core/tsi/ssl_transport_security.h',
|
||||
'src/core/tsi/ssl_types.h',
|
||||
'src/core/tsi/transport_security_grpc.h',
|
||||
|
|
@ -343,11 +346,14 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/channel/channel_args.h',
|
||||
'src/core/lib/channel/channel_stack.h',
|
||||
'src/core/lib/channel/channel_stack_builder.h',
|
||||
'src/core/lib/channel/channel_trace.h',
|
||||
'src/core/lib/channel/channel_trace_registry.h',
|
||||
'src/core/lib/channel/connected_channel.h',
|
||||
'src/core/lib/channel/context.h',
|
||||
'src/core/lib/channel/handshaker.h',
|
||||
'src/core/lib/channel/handshaker_factory.h',
|
||||
'src/core/lib/channel/handshaker_registry.h',
|
||||
'src/core/lib/channel/status_util.h',
|
||||
'src/core/lib/compression/algorithm_metadata.h',
|
||||
'src/core/lib/compression/compression_internal.h',
|
||||
'src/core/lib/compression/message_compress.h',
|
||||
|
|
@ -382,9 +388,9 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/gethostname.h',
|
||||
'src/core/lib/iomgr/iocp_windows.h',
|
||||
'src/core/lib/iomgr/iomgr.h',
|
||||
'src/core/lib/iomgr/iomgr_custom.h',
|
||||
'src/core/lib/iomgr/iomgr_internal.h',
|
||||
'src/core/lib/iomgr/iomgr_posix.h',
|
||||
'src/core/lib/iomgr/iomgr_uv.h',
|
||||
'src/core/lib/iomgr/is_epollexclusive_available.h',
|
||||
'src/core/lib/iomgr/load_file.h',
|
||||
'src/core/lib/iomgr/lockfree_event.h',
|
||||
|
|
@ -392,14 +398,17 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/network_status_tracker.h',
|
||||
'src/core/lib/iomgr/polling_entity.h',
|
||||
'src/core/lib/iomgr/pollset.h',
|
||||
'src/core/lib/iomgr/pollset_custom.h',
|
||||
'src/core/lib/iomgr/pollset_set.h',
|
||||
'src/core/lib/iomgr/pollset_set_custom.h',
|
||||
'src/core/lib/iomgr/pollset_set_windows.h',
|
||||
'src/core/lib/iomgr/pollset_uv.h',
|
||||
'src/core/lib/iomgr/pollset_windows.h',
|
||||
'src/core/lib/iomgr/port.h',
|
||||
'src/core/lib/iomgr/resolve_address.h',
|
||||
'src/core/lib/iomgr/resolve_address_custom.h',
|
||||
'src/core/lib/iomgr/resource_quota.h',
|
||||
'src/core/lib/iomgr/sockaddr.h',
|
||||
'src/core/lib/iomgr/sockaddr_custom.h',
|
||||
'src/core/lib/iomgr/sockaddr_posix.h',
|
||||
'src/core/lib/iomgr/sockaddr_utils.h',
|
||||
'src/core/lib/iomgr/sockaddr_windows.h',
|
||||
|
|
@ -411,17 +420,16 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/sys_epoll_wrapper.h',
|
||||
'src/core/lib/iomgr/tcp_client.h',
|
||||
'src/core/lib/iomgr/tcp_client_posix.h',
|
||||
'src/core/lib/iomgr/tcp_custom.h',
|
||||
'src/core/lib/iomgr/tcp_posix.h',
|
||||
'src/core/lib/iomgr/tcp_server.h',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix.h',
|
||||
'src/core/lib/iomgr/tcp_uv.h',
|
||||
'src/core/lib/iomgr/tcp_windows.h',
|
||||
'src/core/lib/iomgr/time_averaged_stats.h',
|
||||
'src/core/lib/iomgr/timer.h',
|
||||
'src/core/lib/iomgr/timer_generic.h',
|
||||
'src/core/lib/iomgr/timer_custom.h',
|
||||
'src/core/lib/iomgr/timer_heap.h',
|
||||
'src/core/lib/iomgr/timer_manager.h',
|
||||
'src/core/lib/iomgr/timer_uv.h',
|
||||
'src/core/lib/iomgr/udp_server.h',
|
||||
'src/core/lib/iomgr/unix_sockets_posix.h',
|
||||
'src/core/lib/iomgr/wakeup_fd_cv.h',
|
||||
|
|
@ -479,6 +487,7 @@ Pod::Spec.new do |s|
|
|||
'src/core/ext/filters/load_reporting/server_load_reporting_plugin.h',
|
||||
'src/core/ext/filters/max_age/max_age_filter.h',
|
||||
'src/core/ext/filters/message_size/message_size_filter.h',
|
||||
'src/core/ext/filters/http/client_authority_filter.h',
|
||||
'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h',
|
||||
'src/core/ext/filters/workarounds/workaround_utils.h'
|
||||
|
||||
|
|
@ -522,11 +531,14 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/channel/channel_args.h',
|
||||
'src/core/lib/channel/channel_stack.h',
|
||||
'src/core/lib/channel/channel_stack_builder.h',
|
||||
'src/core/lib/channel/channel_trace.h',
|
||||
'src/core/lib/channel/channel_trace_registry.h',
|
||||
'src/core/lib/channel/connected_channel.h',
|
||||
'src/core/lib/channel/context.h',
|
||||
'src/core/lib/channel/handshaker.h',
|
||||
'src/core/lib/channel/handshaker_factory.h',
|
||||
'src/core/lib/channel/handshaker_registry.h',
|
||||
'src/core/lib/channel/status_util.h',
|
||||
'src/core/lib/compression/algorithm_metadata.h',
|
||||
'src/core/lib/compression/compression_internal.h',
|
||||
'src/core/lib/compression/message_compress.h',
|
||||
|
|
@ -561,9 +573,9 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/gethostname.h',
|
||||
'src/core/lib/iomgr/iocp_windows.h',
|
||||
'src/core/lib/iomgr/iomgr.h',
|
||||
'src/core/lib/iomgr/iomgr_custom.h',
|
||||
'src/core/lib/iomgr/iomgr_internal.h',
|
||||
'src/core/lib/iomgr/iomgr_posix.h',
|
||||
'src/core/lib/iomgr/iomgr_uv.h',
|
||||
'src/core/lib/iomgr/is_epollexclusive_available.h',
|
||||
'src/core/lib/iomgr/load_file.h',
|
||||
'src/core/lib/iomgr/lockfree_event.h',
|
||||
|
|
@ -571,14 +583,17 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/network_status_tracker.h',
|
||||
'src/core/lib/iomgr/polling_entity.h',
|
||||
'src/core/lib/iomgr/pollset.h',
|
||||
'src/core/lib/iomgr/pollset_custom.h',
|
||||
'src/core/lib/iomgr/pollset_set.h',
|
||||
'src/core/lib/iomgr/pollset_set_custom.h',
|
||||
'src/core/lib/iomgr/pollset_set_windows.h',
|
||||
'src/core/lib/iomgr/pollset_uv.h',
|
||||
'src/core/lib/iomgr/pollset_windows.h',
|
||||
'src/core/lib/iomgr/port.h',
|
||||
'src/core/lib/iomgr/resolve_address.h',
|
||||
'src/core/lib/iomgr/resolve_address_custom.h',
|
||||
'src/core/lib/iomgr/resource_quota.h',
|
||||
'src/core/lib/iomgr/sockaddr.h',
|
||||
'src/core/lib/iomgr/sockaddr_custom.h',
|
||||
'src/core/lib/iomgr/sockaddr_posix.h',
|
||||
'src/core/lib/iomgr/sockaddr_utils.h',
|
||||
'src/core/lib/iomgr/sockaddr_windows.h',
|
||||
|
|
@ -590,17 +605,16 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/sys_epoll_wrapper.h',
|
||||
'src/core/lib/iomgr/tcp_client.h',
|
||||
'src/core/lib/iomgr/tcp_client_posix.h',
|
||||
'src/core/lib/iomgr/tcp_custom.h',
|
||||
'src/core/lib/iomgr/tcp_posix.h',
|
||||
'src/core/lib/iomgr/tcp_server.h',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix.h',
|
||||
'src/core/lib/iomgr/tcp_uv.h',
|
||||
'src/core/lib/iomgr/tcp_windows.h',
|
||||
'src/core/lib/iomgr/time_averaged_stats.h',
|
||||
'src/core/lib/iomgr/timer.h',
|
||||
'src/core/lib/iomgr/timer_generic.h',
|
||||
'src/core/lib/iomgr/timer_custom.h',
|
||||
'src/core/lib/iomgr/timer_heap.h',
|
||||
'src/core/lib/iomgr/timer_manager.h',
|
||||
'src/core/lib/iomgr/timer_uv.h',
|
||||
'src/core/lib/iomgr/udp_server.h',
|
||||
'src/core/lib/iomgr/unix_sockets_posix.h',
|
||||
'src/core/lib/iomgr/wakeup_fd_cv.h',
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'gRPC-Core'
|
||||
version = '1.11.0-dev'
|
||||
version = '1.13.0-dev'
|
||||
s.version = version
|
||||
s.summary = 'Core cross-platform gRPC library, written in C'
|
||||
s.homepage = 'https://grpc.io'
|
||||
|
|
@ -270,6 +270,7 @@ Pod::Spec.new do |s|
|
|||
'src/core/ext/filters/http/client/http_client_filter.h',
|
||||
'src/core/ext/filters/http/message_compress/message_compress_filter.h',
|
||||
'src/core/ext/filters/http/server/http_server_filter.h',
|
||||
'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h',
|
||||
'src/core/lib/security/context/security_context.h',
|
||||
'src/core/lib/security/credentials/alts/alts_credentials.h',
|
||||
'src/core/lib/security/credentials/composite/composite_credentials.h',
|
||||
|
|
@ -317,8 +318,8 @@ Pod::Spec.new do |s|
|
|||
'src/core/tsi/alts/handshaker/handshaker.pb.h',
|
||||
'src/core/tsi/alts/handshaker/transport_security_common.pb.h',
|
||||
'src/core/tsi/transport_security.h',
|
||||
'src/core/tsi/transport_security_adapter.h',
|
||||
'src/core/tsi/transport_security_interface.h',
|
||||
'src/core/ext/transport/chttp2/client/authority.h',
|
||||
'src/core/ext/transport/chttp2/client/chttp2_connector.h',
|
||||
'src/core/ext/filters/client_channel/backup_poller.h',
|
||||
'src/core/ext/filters/client_channel/client_channel.h',
|
||||
|
|
@ -337,13 +338,14 @@ Pod::Spec.new do |s|
|
|||
'src/core/ext/filters/client_channel/resolver_factory.h',
|
||||
'src/core/ext/filters/client_channel/resolver_registry.h',
|
||||
'src/core/ext/filters/client_channel/retry_throttle.h',
|
||||
'src/core/ext/filters/client_channel/status_util.h',
|
||||
'src/core/ext/filters/client_channel/subchannel.h',
|
||||
'src/core/ext/filters/client_channel/subchannel_index.h',
|
||||
'src/core/ext/filters/client_channel/uri_parser.h',
|
||||
'src/core/ext/filters/deadline/deadline_filter.h',
|
||||
'src/core/tsi/alts_transport_security.h',
|
||||
'src/core/tsi/fake_transport_security.h',
|
||||
'src/core/tsi/ssl/session_cache/ssl_session.h',
|
||||
'src/core/tsi/ssl/session_cache/ssl_session_cache.h',
|
||||
'src/core/tsi/ssl_transport_security.h',
|
||||
'src/core/tsi/ssl_types.h',
|
||||
'src/core/tsi/transport_security_grpc.h',
|
||||
|
|
@ -354,11 +356,14 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/channel/channel_args.h',
|
||||
'src/core/lib/channel/channel_stack.h',
|
||||
'src/core/lib/channel/channel_stack_builder.h',
|
||||
'src/core/lib/channel/channel_trace.h',
|
||||
'src/core/lib/channel/channel_trace_registry.h',
|
||||
'src/core/lib/channel/connected_channel.h',
|
||||
'src/core/lib/channel/context.h',
|
||||
'src/core/lib/channel/handshaker.h',
|
||||
'src/core/lib/channel/handshaker_factory.h',
|
||||
'src/core/lib/channel/handshaker_registry.h',
|
||||
'src/core/lib/channel/status_util.h',
|
||||
'src/core/lib/compression/algorithm_metadata.h',
|
||||
'src/core/lib/compression/compression_internal.h',
|
||||
'src/core/lib/compression/message_compress.h',
|
||||
|
|
@ -393,9 +398,9 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/gethostname.h',
|
||||
'src/core/lib/iomgr/iocp_windows.h',
|
||||
'src/core/lib/iomgr/iomgr.h',
|
||||
'src/core/lib/iomgr/iomgr_custom.h',
|
||||
'src/core/lib/iomgr/iomgr_internal.h',
|
||||
'src/core/lib/iomgr/iomgr_posix.h',
|
||||
'src/core/lib/iomgr/iomgr_uv.h',
|
||||
'src/core/lib/iomgr/is_epollexclusive_available.h',
|
||||
'src/core/lib/iomgr/load_file.h',
|
||||
'src/core/lib/iomgr/lockfree_event.h',
|
||||
|
|
@ -403,14 +408,17 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/network_status_tracker.h',
|
||||
'src/core/lib/iomgr/polling_entity.h',
|
||||
'src/core/lib/iomgr/pollset.h',
|
||||
'src/core/lib/iomgr/pollset_custom.h',
|
||||
'src/core/lib/iomgr/pollset_set.h',
|
||||
'src/core/lib/iomgr/pollset_set_custom.h',
|
||||
'src/core/lib/iomgr/pollset_set_windows.h',
|
||||
'src/core/lib/iomgr/pollset_uv.h',
|
||||
'src/core/lib/iomgr/pollset_windows.h',
|
||||
'src/core/lib/iomgr/port.h',
|
||||
'src/core/lib/iomgr/resolve_address.h',
|
||||
'src/core/lib/iomgr/resolve_address_custom.h',
|
||||
'src/core/lib/iomgr/resource_quota.h',
|
||||
'src/core/lib/iomgr/sockaddr.h',
|
||||
'src/core/lib/iomgr/sockaddr_custom.h',
|
||||
'src/core/lib/iomgr/sockaddr_posix.h',
|
||||
'src/core/lib/iomgr/sockaddr_utils.h',
|
||||
'src/core/lib/iomgr/sockaddr_windows.h',
|
||||
|
|
@ -422,17 +430,16 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/sys_epoll_wrapper.h',
|
||||
'src/core/lib/iomgr/tcp_client.h',
|
||||
'src/core/lib/iomgr/tcp_client_posix.h',
|
||||
'src/core/lib/iomgr/tcp_custom.h',
|
||||
'src/core/lib/iomgr/tcp_posix.h',
|
||||
'src/core/lib/iomgr/tcp_server.h',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix.h',
|
||||
'src/core/lib/iomgr/tcp_uv.h',
|
||||
'src/core/lib/iomgr/tcp_windows.h',
|
||||
'src/core/lib/iomgr/time_averaged_stats.h',
|
||||
'src/core/lib/iomgr/timer.h',
|
||||
'src/core/lib/iomgr/timer_generic.h',
|
||||
'src/core/lib/iomgr/timer_custom.h',
|
||||
'src/core/lib/iomgr/timer_heap.h',
|
||||
'src/core/lib/iomgr/timer_manager.h',
|
||||
'src/core/lib/iomgr/timer_uv.h',
|
||||
'src/core/lib/iomgr/udp_server.h',
|
||||
'src/core/lib/iomgr/unix_sockets_posix.h',
|
||||
'src/core/lib/iomgr/wakeup_fd_cv.h',
|
||||
|
|
@ -490,6 +497,7 @@ Pod::Spec.new do |s|
|
|||
'src/core/ext/filters/load_reporting/server_load_reporting_plugin.h',
|
||||
'src/core/ext/filters/max_age/max_age_filter.h',
|
||||
'src/core/ext/filters/message_size/message_size_filter.h',
|
||||
'src/core/ext/filters/http/client_authority_filter.h',
|
||||
'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h',
|
||||
'src/core/ext/filters/workarounds/workaround_utils.h',
|
||||
'src/core/lib/surface/init.cc',
|
||||
|
|
@ -498,10 +506,13 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/channel/channel_args.cc',
|
||||
'src/core/lib/channel/channel_stack.cc',
|
||||
'src/core/lib/channel/channel_stack_builder.cc',
|
||||
'src/core/lib/channel/channel_trace.cc',
|
||||
'src/core/lib/channel/channel_trace_registry.cc',
|
||||
'src/core/lib/channel/connected_channel.cc',
|
||||
'src/core/lib/channel/handshaker.cc',
|
||||
'src/core/lib/channel/handshaker_factory.cc',
|
||||
'src/core/lib/channel/handshaker_registry.cc',
|
||||
'src/core/lib/channel/status_util.cc',
|
||||
'src/core/lib/compression/compression.cc',
|
||||
'src/core/lib/compression/compression_internal.cc',
|
||||
'src/core/lib/compression/message_compress.cc',
|
||||
|
|
@ -535,6 +546,8 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/gethostname_sysconf.cc',
|
||||
'src/core/lib/iomgr/iocp_windows.cc',
|
||||
'src/core/lib/iomgr/iomgr.cc',
|
||||
'src/core/lib/iomgr/iomgr_custom.cc',
|
||||
'src/core/lib/iomgr/iomgr_internal.cc',
|
||||
'src/core/lib/iomgr/iomgr_posix.cc',
|
||||
'src/core/lib/iomgr/iomgr_uv.cc',
|
||||
'src/core/lib/iomgr/iomgr_windows.cc',
|
||||
|
|
@ -543,12 +556,16 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/lockfree_event.cc',
|
||||
'src/core/lib/iomgr/network_status_tracker.cc',
|
||||
'src/core/lib/iomgr/polling_entity.cc',
|
||||
'src/core/lib/iomgr/pollset_set_uv.cc',
|
||||
'src/core/lib/iomgr/pollset.cc',
|
||||
'src/core/lib/iomgr/pollset_custom.cc',
|
||||
'src/core/lib/iomgr/pollset_set.cc',
|
||||
'src/core/lib/iomgr/pollset_set_custom.cc',
|
||||
'src/core/lib/iomgr/pollset_set_windows.cc',
|
||||
'src/core/lib/iomgr/pollset_uv.cc',
|
||||
'src/core/lib/iomgr/pollset_windows.cc',
|
||||
'src/core/lib/iomgr/resolve_address.cc',
|
||||
'src/core/lib/iomgr/resolve_address_custom.cc',
|
||||
'src/core/lib/iomgr/resolve_address_posix.cc',
|
||||
'src/core/lib/iomgr/resolve_address_uv.cc',
|
||||
'src/core/lib/iomgr/resolve_address_windows.cc',
|
||||
'src/core/lib/iomgr/resource_quota.cc',
|
||||
'src/core/lib/iomgr/sockaddr_utils.cc',
|
||||
|
|
@ -560,19 +577,24 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/socket_utils_uv.cc',
|
||||
'src/core/lib/iomgr/socket_utils_windows.cc',
|
||||
'src/core/lib/iomgr/socket_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_client.cc',
|
||||
'src/core/lib/iomgr/tcp_client_custom.cc',
|
||||
'src/core/lib/iomgr/tcp_client_posix.cc',
|
||||
'src/core/lib/iomgr/tcp_client_uv.cc',
|
||||
'src/core/lib/iomgr/tcp_client_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_custom.cc',
|
||||
'src/core/lib/iomgr/tcp_posix.cc',
|
||||
'src/core/lib/iomgr/tcp_server.cc',
|
||||
'src/core/lib/iomgr/tcp_server_custom.cc',
|
||||
'src/core/lib/iomgr/tcp_server_posix.cc',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix_common.cc',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
|
||||
'src/core/lib/iomgr/tcp_server_uv.cc',
|
||||
'src/core/lib/iomgr/tcp_server_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_uv.cc',
|
||||
'src/core/lib/iomgr/tcp_windows.cc',
|
||||
'src/core/lib/iomgr/time_averaged_stats.cc',
|
||||
'src/core/lib/iomgr/timer.cc',
|
||||
'src/core/lib/iomgr/timer_custom.cc',
|
||||
'src/core/lib/iomgr/timer_generic.cc',
|
||||
'src/core/lib/iomgr/timer_heap.cc',
|
||||
'src/core/lib/iomgr/timer_manager.cc',
|
||||
|
|
@ -714,9 +736,9 @@ Pod::Spec.new do |s|
|
|||
'src/core/tsi/alts/handshaker/handshaker.pb.c',
|
||||
'src/core/tsi/alts/handshaker/transport_security_common.pb.c',
|
||||
'src/core/tsi/transport_security.cc',
|
||||
'src/core/tsi/transport_security_adapter.cc',
|
||||
'src/core/ext/transport/chttp2/client/insecure/channel_create.cc',
|
||||
'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc',
|
||||
'src/core/ext/transport/chttp2/client/authority.cc',
|
||||
'src/core/ext/transport/chttp2/client/chttp2_connector.cc',
|
||||
'src/core/ext/filters/client_channel/backup_poller.cc',
|
||||
'src/core/ext/filters/client_channel/channel_connectivity.cc',
|
||||
|
|
@ -736,13 +758,15 @@ Pod::Spec.new do |s|
|
|||
'src/core/ext/filters/client_channel/resolver.cc',
|
||||
'src/core/ext/filters/client_channel/resolver_registry.cc',
|
||||
'src/core/ext/filters/client_channel/retry_throttle.cc',
|
||||
'src/core/ext/filters/client_channel/status_util.cc',
|
||||
'src/core/ext/filters/client_channel/subchannel.cc',
|
||||
'src/core/ext/filters/client_channel/subchannel_index.cc',
|
||||
'src/core/ext/filters/client_channel/uri_parser.cc',
|
||||
'src/core/ext/filters/deadline/deadline_filter.cc',
|
||||
'src/core/tsi/alts_transport_security.cc',
|
||||
'src/core/tsi/fake_transport_security.cc',
|
||||
'src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc',
|
||||
'src/core/tsi/ssl/session_cache/ssl_session_cache.cc',
|
||||
'src/core/tsi/ssl/session_cache/ssl_session_openssl.cc',
|
||||
'src/core/tsi/ssl_transport_security.cc',
|
||||
'src/core/tsi/transport_security_grpc.cc',
|
||||
'src/core/ext/transport/chttp2/server/chttp2_server.cc',
|
||||
|
|
@ -759,7 +783,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
|
||||
'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc',
|
||||
'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc',
|
||||
'src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc',
|
||||
'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc',
|
||||
|
|
@ -772,6 +795,7 @@ Pod::Spec.new do |s|
|
|||
'src/core/ext/census/grpc_context.cc',
|
||||
'src/core/ext/filters/max_age/max_age_filter.cc',
|
||||
'src/core/ext/filters/message_size/message_size_filter.cc',
|
||||
'src/core/ext/filters/http/client_authority_filter.cc',
|
||||
'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc',
|
||||
'src/core/ext/filters/workarounds/workaround_utils.cc',
|
||||
'src/core/plugin_registry/grpc_plugin_registry.cc'
|
||||
|
|
@ -824,6 +848,7 @@ Pod::Spec.new do |s|
|
|||
'src/core/ext/filters/http/client/http_client_filter.h',
|
||||
'src/core/ext/filters/http/message_compress/message_compress_filter.h',
|
||||
'src/core/ext/filters/http/server/http_server_filter.h',
|
||||
'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h',
|
||||
'src/core/lib/security/context/security_context.h',
|
||||
'src/core/lib/security/credentials/alts/alts_credentials.h',
|
||||
'src/core/lib/security/credentials/composite/composite_credentials.h',
|
||||
|
|
@ -871,8 +896,8 @@ Pod::Spec.new do |s|
|
|||
'src/core/tsi/alts/handshaker/handshaker.pb.h',
|
||||
'src/core/tsi/alts/handshaker/transport_security_common.pb.h',
|
||||
'src/core/tsi/transport_security.h',
|
||||
'src/core/tsi/transport_security_adapter.h',
|
||||
'src/core/tsi/transport_security_interface.h',
|
||||
'src/core/ext/transport/chttp2/client/authority.h',
|
||||
'src/core/ext/transport/chttp2/client/chttp2_connector.h',
|
||||
'src/core/ext/filters/client_channel/backup_poller.h',
|
||||
'src/core/ext/filters/client_channel/client_channel.h',
|
||||
|
|
@ -891,13 +916,14 @@ Pod::Spec.new do |s|
|
|||
'src/core/ext/filters/client_channel/resolver_factory.h',
|
||||
'src/core/ext/filters/client_channel/resolver_registry.h',
|
||||
'src/core/ext/filters/client_channel/retry_throttle.h',
|
||||
'src/core/ext/filters/client_channel/status_util.h',
|
||||
'src/core/ext/filters/client_channel/subchannel.h',
|
||||
'src/core/ext/filters/client_channel/subchannel_index.h',
|
||||
'src/core/ext/filters/client_channel/uri_parser.h',
|
||||
'src/core/ext/filters/deadline/deadline_filter.h',
|
||||
'src/core/tsi/alts_transport_security.h',
|
||||
'src/core/tsi/fake_transport_security.h',
|
||||
'src/core/tsi/ssl/session_cache/ssl_session.h',
|
||||
'src/core/tsi/ssl/session_cache/ssl_session_cache.h',
|
||||
'src/core/tsi/ssl_transport_security.h',
|
||||
'src/core/tsi/ssl_types.h',
|
||||
'src/core/tsi/transport_security_grpc.h',
|
||||
|
|
@ -908,11 +934,14 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/channel/channel_args.h',
|
||||
'src/core/lib/channel/channel_stack.h',
|
||||
'src/core/lib/channel/channel_stack_builder.h',
|
||||
'src/core/lib/channel/channel_trace.h',
|
||||
'src/core/lib/channel/channel_trace_registry.h',
|
||||
'src/core/lib/channel/connected_channel.h',
|
||||
'src/core/lib/channel/context.h',
|
||||
'src/core/lib/channel/handshaker.h',
|
||||
'src/core/lib/channel/handshaker_factory.h',
|
||||
'src/core/lib/channel/handshaker_registry.h',
|
||||
'src/core/lib/channel/status_util.h',
|
||||
'src/core/lib/compression/algorithm_metadata.h',
|
||||
'src/core/lib/compression/compression_internal.h',
|
||||
'src/core/lib/compression/message_compress.h',
|
||||
|
|
@ -947,9 +976,9 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/gethostname.h',
|
||||
'src/core/lib/iomgr/iocp_windows.h',
|
||||
'src/core/lib/iomgr/iomgr.h',
|
||||
'src/core/lib/iomgr/iomgr_custom.h',
|
||||
'src/core/lib/iomgr/iomgr_internal.h',
|
||||
'src/core/lib/iomgr/iomgr_posix.h',
|
||||
'src/core/lib/iomgr/iomgr_uv.h',
|
||||
'src/core/lib/iomgr/is_epollexclusive_available.h',
|
||||
'src/core/lib/iomgr/load_file.h',
|
||||
'src/core/lib/iomgr/lockfree_event.h',
|
||||
|
|
@ -957,14 +986,17 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/network_status_tracker.h',
|
||||
'src/core/lib/iomgr/polling_entity.h',
|
||||
'src/core/lib/iomgr/pollset.h',
|
||||
'src/core/lib/iomgr/pollset_custom.h',
|
||||
'src/core/lib/iomgr/pollset_set.h',
|
||||
'src/core/lib/iomgr/pollset_set_custom.h',
|
||||
'src/core/lib/iomgr/pollset_set_windows.h',
|
||||
'src/core/lib/iomgr/pollset_uv.h',
|
||||
'src/core/lib/iomgr/pollset_windows.h',
|
||||
'src/core/lib/iomgr/port.h',
|
||||
'src/core/lib/iomgr/resolve_address.h',
|
||||
'src/core/lib/iomgr/resolve_address_custom.h',
|
||||
'src/core/lib/iomgr/resource_quota.h',
|
||||
'src/core/lib/iomgr/sockaddr.h',
|
||||
'src/core/lib/iomgr/sockaddr_custom.h',
|
||||
'src/core/lib/iomgr/sockaddr_posix.h',
|
||||
'src/core/lib/iomgr/sockaddr_utils.h',
|
||||
'src/core/lib/iomgr/sockaddr_windows.h',
|
||||
|
|
@ -976,17 +1008,16 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/iomgr/sys_epoll_wrapper.h',
|
||||
'src/core/lib/iomgr/tcp_client.h',
|
||||
'src/core/lib/iomgr/tcp_client_posix.h',
|
||||
'src/core/lib/iomgr/tcp_custom.h',
|
||||
'src/core/lib/iomgr/tcp_posix.h',
|
||||
'src/core/lib/iomgr/tcp_server.h',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix.h',
|
||||
'src/core/lib/iomgr/tcp_uv.h',
|
||||
'src/core/lib/iomgr/tcp_windows.h',
|
||||
'src/core/lib/iomgr/time_averaged_stats.h',
|
||||
'src/core/lib/iomgr/timer.h',
|
||||
'src/core/lib/iomgr/timer_generic.h',
|
||||
'src/core/lib/iomgr/timer_custom.h',
|
||||
'src/core/lib/iomgr/timer_heap.h',
|
||||
'src/core/lib/iomgr/timer_manager.h',
|
||||
'src/core/lib/iomgr/timer_uv.h',
|
||||
'src/core/lib/iomgr/udp_server.h',
|
||||
'src/core/lib/iomgr/unix_sockets_posix.h',
|
||||
'src/core/lib/iomgr/wakeup_fd_cv.h',
|
||||
|
|
@ -1044,6 +1075,7 @@ Pod::Spec.new do |s|
|
|||
'src/core/ext/filters/load_reporting/server_load_reporting_plugin.h',
|
||||
'src/core/ext/filters/max_age/max_age_filter.h',
|
||||
'src/core/ext/filters/message_size/message_size_filter.h',
|
||||
'src/core/ext/filters/http/client_authority_filter.h',
|
||||
'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h',
|
||||
'src/core/ext/filters/workarounds/workaround_utils.h'
|
||||
end
|
||||
|
|
@ -1091,6 +1123,7 @@ Pod::Spec.new do |s|
|
|||
'test/core/end2end/fixtures/proxy.cc',
|
||||
'test/core/iomgr/endpoint_tests.cc',
|
||||
'test/core/util/debugger_macros.cc',
|
||||
'test/core/util/fuzzer_util.cc',
|
||||
'test/core/util/grpc_profiler.cc',
|
||||
'test/core/util/histogram.cc',
|
||||
'test/core/util/memory_counters.cc',
|
||||
|
|
@ -1113,6 +1146,7 @@ Pod::Spec.new do |s|
|
|||
'test/core/end2end/fixtures/proxy.h',
|
||||
'test/core/iomgr/endpoint_tests.h',
|
||||
'test/core/util/debugger_macros.h',
|
||||
'test/core/util/fuzzer_util.h',
|
||||
'test/core/util/grpc_profiler.h',
|
||||
'test/core/util/histogram.h',
|
||||
'test/core/util/memory_counters.h',
|
||||
|
|
@ -1133,6 +1167,7 @@ Pod::Spec.new do |s|
|
|||
'test/core/end2end/tests/bad_ping.cc',
|
||||
'test/core/end2end/tests/binary_metadata.cc',
|
||||
'test/core/end2end/tests/call_creds.cc',
|
||||
'test/core/end2end/tests/call_host_override.cc',
|
||||
'test/core/end2end/tests/cancel_after_accept.cc',
|
||||
'test/core/end2end/tests/cancel_after_client_done.cc',
|
||||
'test/core/end2end/tests/cancel_after_invoke.cc',
|
||||
|
|
@ -1179,6 +1214,7 @@ Pod::Spec.new do |s|
|
|||
'test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc',
|
||||
'test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc',
|
||||
'test/core/end2end/tests/retry_non_retriable_status.cc',
|
||||
'test/core/end2end/tests/retry_non_retriable_status_before_recv_trailing_metadata_started.cc',
|
||||
'test/core/end2end/tests/retry_recv_initial_metadata.cc',
|
||||
'test/core/end2end/tests/retry_recv_message.cc',
|
||||
'test/core/end2end/tests/retry_server_pushback_delay.cc',
|
||||
|
|
@ -1209,6 +1245,6 @@ Pod::Spec.new do |s|
|
|||
|
||||
# TODO (mxyan): Instead of this hack, add include path "third_party" to C core's include path?
|
||||
s.prepare_command = <<-END_OF_COMMAND
|
||||
find src/core/ -type f -exec sed -E -i'.back' 's;#include "third_party/nanopb/(.*)";#include <nanopb/\\1>;g' {} \\\;
|
||||
find src/core/ -type f ! -path '*.back*' -exec sed -E -i'.back' 's;#include "third_party/nanopb/(.*)";#include <nanopb/\\1>;g' {} \\\;
|
||||
END_OF_COMMAND
|
||||
end
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'gRPC-ProtoRPC'
|
||||
version = '1.11.0-dev'
|
||||
version = '1.13.0-dev'
|
||||
s.version = version
|
||||
s.summary = 'RPC library for Protocol Buffers, based on gRPC'
|
||||
s.homepage = 'https://grpc.io'
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'gRPC-RxLibrary'
|
||||
version = '1.11.0-dev'
|
||||
version = '1.13.0-dev'
|
||||
s.version = version
|
||||
s.summary = 'Reactive Extensions library for iOS/OSX.'
|
||||
s.homepage = 'https://grpc.io'
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'gRPC'
|
||||
version = '1.11.0-dev'
|
||||
version = '1.13.0-dev'
|
||||
s.version = version
|
||||
s.summary = 'gRPC client library for iOS/OSX'
|
||||
s.homepage = 'https://grpc.io'
|
||||
|
|
|
|||
12
grpc.def
12
grpc.def
|
|
@ -45,6 +45,8 @@ EXPORTS
|
|||
grpc_insecure_channel_create
|
||||
grpc_lame_client_channel_create
|
||||
grpc_channel_destroy
|
||||
grpc_channel_get_trace
|
||||
grpc_channel_get_uuid
|
||||
grpc_call_cancel
|
||||
grpc_call_cancel_with_status
|
||||
grpc_call_ref
|
||||
|
|
@ -83,6 +85,9 @@ EXPORTS
|
|||
grpc_auth_context_add_property
|
||||
grpc_auth_context_add_cstring_property
|
||||
grpc_auth_context_set_peer_identity_property_name
|
||||
grpc_ssl_session_cache_create_lru
|
||||
grpc_ssl_session_cache_destroy
|
||||
grpc_ssl_session_cache_create_channel_arg
|
||||
grpc_channel_credentials_release
|
||||
grpc_google_default_credentials_create
|
||||
grpc_set_ssl_roots_override_callback
|
||||
|
|
@ -110,6 +115,12 @@ EXPORTS
|
|||
grpc_server_add_secure_http2_port
|
||||
grpc_call_set_credentials
|
||||
grpc_server_credentials_set_auth_metadata_processor
|
||||
grpc_alts_credentials_client_options_create
|
||||
grpc_alts_credentials_server_options_create
|
||||
grpc_alts_credentials_client_options_add_target_service_account
|
||||
grpc_alts_credentials_options_destroy
|
||||
grpc_alts_credentials_create
|
||||
grpc_alts_server_credentials_create
|
||||
grpc_raw_byte_buffer_create
|
||||
grpc_raw_compressed_byte_buffer_create
|
||||
grpc_byte_buffer_copy
|
||||
|
|
@ -180,6 +191,7 @@ EXPORTS
|
|||
gpr_cpu_current_cpu
|
||||
gpr_log_severity_string
|
||||
gpr_log
|
||||
gpr_should_log
|
||||
gpr_log_message
|
||||
gpr_set_log_verbosity
|
||||
gpr_log_verbosity_init
|
||||
|
|
|
|||
61
grpc.gemspec
61
grpc.gemspec
|
|
@ -44,6 +44,11 @@ Gem::Specification.new do |s|
|
|||
|
||||
s.extensions = %w(src/ruby/ext/grpc/extconf.rb)
|
||||
|
||||
s.files += %w( third_party/address_sorting/address_sorting_internal.h )
|
||||
s.files += %w( third_party/address_sorting/include/address_sorting/address_sorting.h )
|
||||
s.files += %w( third_party/address_sorting/address_sorting.c )
|
||||
s.files += %w( third_party/address_sorting/address_sorting_posix.c )
|
||||
s.files += %w( third_party/address_sorting/address_sorting_windows.c )
|
||||
s.files += %w( include/grpc/support/alloc.h )
|
||||
s.files += %w( include/grpc/support/atm.h )
|
||||
s.files += %w( include/grpc/support/atm_gcc_atomic.h )
|
||||
|
|
@ -196,6 +201,7 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/ext/filters/http/client/http_client_filter.h )
|
||||
s.files += %w( src/core/ext/filters/http/message_compress/message_compress_filter.h )
|
||||
s.files += %w( src/core/ext/filters/http/server/http_server_filter.h )
|
||||
s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h )
|
||||
s.files += %w( src/core/lib/security/context/security_context.h )
|
||||
s.files += %w( src/core/lib/security/credentials/alts/alts_credentials.h )
|
||||
s.files += %w( src/core/lib/security/credentials/composite/composite_credentials.h )
|
||||
|
|
@ -247,8 +253,8 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( third_party/nanopb/pb_decode.h )
|
||||
s.files += %w( third_party/nanopb/pb_encode.h )
|
||||
s.files += %w( src/core/tsi/transport_security.h )
|
||||
s.files += %w( src/core/tsi/transport_security_adapter.h )
|
||||
s.files += %w( src/core/tsi/transport_security_interface.h )
|
||||
s.files += %w( src/core/ext/transport/chttp2/client/authority.h )
|
||||
s.files += %w( src/core/ext/transport/chttp2/client/chttp2_connector.h )
|
||||
s.files += %w( src/core/ext/filters/client_channel/backup_poller.h )
|
||||
s.files += %w( src/core/ext/filters/client_channel/client_channel.h )
|
||||
|
|
@ -267,13 +273,14 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/ext/filters/client_channel/resolver_factory.h )
|
||||
s.files += %w( src/core/ext/filters/client_channel/resolver_registry.h )
|
||||
s.files += %w( src/core/ext/filters/client_channel/retry_throttle.h )
|
||||
s.files += %w( src/core/ext/filters/client_channel/status_util.h )
|
||||
s.files += %w( src/core/ext/filters/client_channel/subchannel.h )
|
||||
s.files += %w( src/core/ext/filters/client_channel/subchannel_index.h )
|
||||
s.files += %w( src/core/ext/filters/client_channel/uri_parser.h )
|
||||
s.files += %w( src/core/ext/filters/deadline/deadline_filter.h )
|
||||
s.files += %w( src/core/tsi/alts_transport_security.h )
|
||||
s.files += %w( src/core/tsi/fake_transport_security.h )
|
||||
s.files += %w( src/core/tsi/ssl/session_cache/ssl_session.h )
|
||||
s.files += %w( src/core/tsi/ssl/session_cache/ssl_session_cache.h )
|
||||
s.files += %w( src/core/tsi/ssl_transport_security.h )
|
||||
s.files += %w( src/core/tsi/ssl_types.h )
|
||||
s.files += %w( src/core/tsi/transport_security_grpc.h )
|
||||
|
|
@ -284,11 +291,14 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/lib/channel/channel_args.h )
|
||||
s.files += %w( src/core/lib/channel/channel_stack.h )
|
||||
s.files += %w( src/core/lib/channel/channel_stack_builder.h )
|
||||
s.files += %w( src/core/lib/channel/channel_trace.h )
|
||||
s.files += %w( src/core/lib/channel/channel_trace_registry.h )
|
||||
s.files += %w( src/core/lib/channel/connected_channel.h )
|
||||
s.files += %w( src/core/lib/channel/context.h )
|
||||
s.files += %w( src/core/lib/channel/handshaker.h )
|
||||
s.files += %w( src/core/lib/channel/handshaker_factory.h )
|
||||
s.files += %w( src/core/lib/channel/handshaker_registry.h )
|
||||
s.files += %w( src/core/lib/channel/status_util.h )
|
||||
s.files += %w( src/core/lib/compression/algorithm_metadata.h )
|
||||
s.files += %w( src/core/lib/compression/compression_internal.h )
|
||||
s.files += %w( src/core/lib/compression/message_compress.h )
|
||||
|
|
@ -323,9 +333,9 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/lib/iomgr/gethostname.h )
|
||||
s.files += %w( src/core/lib/iomgr/iocp_windows.h )
|
||||
s.files += %w( src/core/lib/iomgr/iomgr.h )
|
||||
s.files += %w( src/core/lib/iomgr/iomgr_custom.h )
|
||||
s.files += %w( src/core/lib/iomgr/iomgr_internal.h )
|
||||
s.files += %w( src/core/lib/iomgr/iomgr_posix.h )
|
||||
s.files += %w( src/core/lib/iomgr/iomgr_uv.h )
|
||||
s.files += %w( src/core/lib/iomgr/is_epollexclusive_available.h )
|
||||
s.files += %w( src/core/lib/iomgr/load_file.h )
|
||||
s.files += %w( src/core/lib/iomgr/lockfree_event.h )
|
||||
|
|
@ -333,14 +343,17 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/lib/iomgr/network_status_tracker.h )
|
||||
s.files += %w( src/core/lib/iomgr/polling_entity.h )
|
||||
s.files += %w( src/core/lib/iomgr/pollset.h )
|
||||
s.files += %w( src/core/lib/iomgr/pollset_custom.h )
|
||||
s.files += %w( src/core/lib/iomgr/pollset_set.h )
|
||||
s.files += %w( src/core/lib/iomgr/pollset_set_custom.h )
|
||||
s.files += %w( src/core/lib/iomgr/pollset_set_windows.h )
|
||||
s.files += %w( src/core/lib/iomgr/pollset_uv.h )
|
||||
s.files += %w( src/core/lib/iomgr/pollset_windows.h )
|
||||
s.files += %w( src/core/lib/iomgr/port.h )
|
||||
s.files += %w( src/core/lib/iomgr/resolve_address.h )
|
||||
s.files += %w( src/core/lib/iomgr/resolve_address_custom.h )
|
||||
s.files += %w( src/core/lib/iomgr/resource_quota.h )
|
||||
s.files += %w( src/core/lib/iomgr/sockaddr.h )
|
||||
s.files += %w( src/core/lib/iomgr/sockaddr_custom.h )
|
||||
s.files += %w( src/core/lib/iomgr/sockaddr_posix.h )
|
||||
s.files += %w( src/core/lib/iomgr/sockaddr_utils.h )
|
||||
s.files += %w( src/core/lib/iomgr/sockaddr_windows.h )
|
||||
|
|
@ -352,17 +365,16 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/lib/iomgr/sys_epoll_wrapper.h )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_client.h )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_client_posix.h )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_custom.h )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_posix.h )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_server.h )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_server_utils_posix.h )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_uv.h )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_windows.h )
|
||||
s.files += %w( src/core/lib/iomgr/time_averaged_stats.h )
|
||||
s.files += %w( src/core/lib/iomgr/timer.h )
|
||||
s.files += %w( src/core/lib/iomgr/timer_generic.h )
|
||||
s.files += %w( src/core/lib/iomgr/timer_custom.h )
|
||||
s.files += %w( src/core/lib/iomgr/timer_heap.h )
|
||||
s.files += %w( src/core/lib/iomgr/timer_manager.h )
|
||||
s.files += %w( src/core/lib/iomgr/timer_uv.h )
|
||||
s.files += %w( src/core/lib/iomgr/udp_server.h )
|
||||
s.files += %w( src/core/lib/iomgr/unix_sockets_posix.h )
|
||||
s.files += %w( src/core/lib/iomgr/wakeup_fd_cv.h )
|
||||
|
|
@ -420,6 +432,7 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/ext/filters/load_reporting/server_load_reporting_plugin.h )
|
||||
s.files += %w( src/core/ext/filters/max_age/max_age_filter.h )
|
||||
s.files += %w( src/core/ext/filters/message_size/message_size_filter.h )
|
||||
s.files += %w( src/core/ext/filters/http/client_authority_filter.h )
|
||||
s.files += %w( src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h )
|
||||
s.files += %w( src/core/ext/filters/workarounds/workaround_utils.h )
|
||||
s.files += %w( src/core/lib/surface/init.cc )
|
||||
|
|
@ -428,10 +441,13 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/lib/channel/channel_args.cc )
|
||||
s.files += %w( src/core/lib/channel/channel_stack.cc )
|
||||
s.files += %w( src/core/lib/channel/channel_stack_builder.cc )
|
||||
s.files += %w( src/core/lib/channel/channel_trace.cc )
|
||||
s.files += %w( src/core/lib/channel/channel_trace_registry.cc )
|
||||
s.files += %w( src/core/lib/channel/connected_channel.cc )
|
||||
s.files += %w( src/core/lib/channel/handshaker.cc )
|
||||
s.files += %w( src/core/lib/channel/handshaker_factory.cc )
|
||||
s.files += %w( src/core/lib/channel/handshaker_registry.cc )
|
||||
s.files += %w( src/core/lib/channel/status_util.cc )
|
||||
s.files += %w( src/core/lib/compression/compression.cc )
|
||||
s.files += %w( src/core/lib/compression/compression_internal.cc )
|
||||
s.files += %w( src/core/lib/compression/message_compress.cc )
|
||||
|
|
@ -465,6 +481,8 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/lib/iomgr/gethostname_sysconf.cc )
|
||||
s.files += %w( src/core/lib/iomgr/iocp_windows.cc )
|
||||
s.files += %w( src/core/lib/iomgr/iomgr.cc )
|
||||
s.files += %w( src/core/lib/iomgr/iomgr_custom.cc )
|
||||
s.files += %w( src/core/lib/iomgr/iomgr_internal.cc )
|
||||
s.files += %w( src/core/lib/iomgr/iomgr_posix.cc )
|
||||
s.files += %w( src/core/lib/iomgr/iomgr_uv.cc )
|
||||
s.files += %w( src/core/lib/iomgr/iomgr_windows.cc )
|
||||
|
|
@ -473,12 +491,16 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/lib/iomgr/lockfree_event.cc )
|
||||
s.files += %w( src/core/lib/iomgr/network_status_tracker.cc )
|
||||
s.files += %w( src/core/lib/iomgr/polling_entity.cc )
|
||||
s.files += %w( src/core/lib/iomgr/pollset_set_uv.cc )
|
||||
s.files += %w( src/core/lib/iomgr/pollset.cc )
|
||||
s.files += %w( src/core/lib/iomgr/pollset_custom.cc )
|
||||
s.files += %w( src/core/lib/iomgr/pollset_set.cc )
|
||||
s.files += %w( src/core/lib/iomgr/pollset_set_custom.cc )
|
||||
s.files += %w( src/core/lib/iomgr/pollset_set_windows.cc )
|
||||
s.files += %w( src/core/lib/iomgr/pollset_uv.cc )
|
||||
s.files += %w( src/core/lib/iomgr/pollset_windows.cc )
|
||||
s.files += %w( src/core/lib/iomgr/resolve_address.cc )
|
||||
s.files += %w( src/core/lib/iomgr/resolve_address_custom.cc )
|
||||
s.files += %w( src/core/lib/iomgr/resolve_address_posix.cc )
|
||||
s.files += %w( src/core/lib/iomgr/resolve_address_uv.cc )
|
||||
s.files += %w( src/core/lib/iomgr/resolve_address_windows.cc )
|
||||
s.files += %w( src/core/lib/iomgr/resource_quota.cc )
|
||||
s.files += %w( src/core/lib/iomgr/sockaddr_utils.cc )
|
||||
|
|
@ -490,19 +512,24 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/lib/iomgr/socket_utils_uv.cc )
|
||||
s.files += %w( src/core/lib/iomgr/socket_utils_windows.cc )
|
||||
s.files += %w( src/core/lib/iomgr/socket_windows.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_client.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_client_custom.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_client_posix.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_client_uv.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_client_windows.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_custom.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_posix.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_server.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_server_custom.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_server_posix.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_server_utils_posix_common.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_server_uv.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_server_windows.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_uv.cc )
|
||||
s.files += %w( src/core/lib/iomgr/tcp_windows.cc )
|
||||
s.files += %w( src/core/lib/iomgr/time_averaged_stats.cc )
|
||||
s.files += %w( src/core/lib/iomgr/timer.cc )
|
||||
s.files += %w( src/core/lib/iomgr/timer_custom.cc )
|
||||
s.files += %w( src/core/lib/iomgr/timer_generic.cc )
|
||||
s.files += %w( src/core/lib/iomgr/timer_heap.cc )
|
||||
s.files += %w( src/core/lib/iomgr/timer_manager.cc )
|
||||
|
|
@ -647,9 +674,9 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( third_party/nanopb/pb_decode.c )
|
||||
s.files += %w( third_party/nanopb/pb_encode.c )
|
||||
s.files += %w( src/core/tsi/transport_security.cc )
|
||||
s.files += %w( src/core/tsi/transport_security_adapter.cc )
|
||||
s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.cc )
|
||||
s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc )
|
||||
s.files += %w( src/core/ext/transport/chttp2/client/authority.cc )
|
||||
s.files += %w( src/core/ext/transport/chttp2/client/chttp2_connector.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/backup_poller.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/channel_connectivity.cc )
|
||||
|
|
@ -669,13 +696,15 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/ext/filters/client_channel/resolver.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/resolver_registry.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/retry_throttle.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/status_util.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/subchannel.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/subchannel_index.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/uri_parser.cc )
|
||||
s.files += %w( src/core/ext/filters/deadline/deadline_filter.cc )
|
||||
s.files += %w( src/core/tsi/alts_transport_security.cc )
|
||||
s.files += %w( src/core/tsi/fake_transport_security.cc )
|
||||
s.files += %w( src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc )
|
||||
s.files += %w( src/core/tsi/ssl/session_cache/ssl_session_cache.cc )
|
||||
s.files += %w( src/core/tsi/ssl/session_cache/ssl_session_openssl.cc )
|
||||
s.files += %w( src/core/tsi/ssl_transport_security.cc )
|
||||
s.files += %w( src/core/tsi/transport_security_grpc.cc )
|
||||
s.files += %w( src/core/ext/transport/chttp2/server/chttp2_server.cc )
|
||||
|
|
@ -692,7 +721,6 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c )
|
||||
s.files += %w( src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc )
|
||||
s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc )
|
||||
|
|
@ -705,6 +733,7 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( src/core/ext/census/grpc_context.cc )
|
||||
s.files += %w( src/core/ext/filters/max_age/max_age_filter.cc )
|
||||
s.files += %w( src/core/ext/filters/message_size/message_size_filter.cc )
|
||||
s.files += %w( src/core/ext/filters/http/client_authority_filter.cc )
|
||||
s.files += %w( src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc )
|
||||
s.files += %w( src/core/ext/filters/workarounds/workaround_utils.cc )
|
||||
s.files += %w( src/core/plugin_registry/grpc_plugin_registry.cc )
|
||||
|
|
@ -714,7 +743,6 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( third_party/boringssl/crypto/cipher_extra/internal.h )
|
||||
s.files += %w( third_party/boringssl/crypto/conf/conf_def.h )
|
||||
s.files += %w( third_party/boringssl/crypto/conf/internal.h )
|
||||
s.files += %w( third_party/boringssl/crypto/curve25519/internal.h )
|
||||
s.files += %w( third_party/boringssl/crypto/err/internal.h )
|
||||
s.files += %w( third_party/boringssl/crypto/evp/internal.h )
|
||||
s.files += %w( third_party/boringssl/crypto/fipsmodule/aes/aes.c )
|
||||
|
|
@ -876,6 +904,7 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( third_party/boringssl/include/openssl/x509_vfy.h )
|
||||
s.files += %w( third_party/boringssl/include/openssl/x509v3.h )
|
||||
s.files += %w( third_party/boringssl/ssl/internal.h )
|
||||
s.files += %w( third_party/boringssl/third_party/fiat/internal.h )
|
||||
s.files += %w( src/boringssl/err_data.c )
|
||||
s.files += %w( third_party/boringssl/crypto/asn1/a_bitstr.c )
|
||||
s.files += %w( third_party/boringssl/crypto/asn1/a_bool.c )
|
||||
|
|
@ -945,7 +974,6 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( third_party/boringssl/crypto/cpu-intel.c )
|
||||
s.files += %w( third_party/boringssl/crypto/cpu-ppc64le.c )
|
||||
s.files += %w( third_party/boringssl/crypto/crypto.c )
|
||||
s.files += %w( third_party/boringssl/crypto/curve25519/curve25519.c )
|
||||
s.files += %w( third_party/boringssl/crypto/curve25519/spake25519.c )
|
||||
s.files += %w( third_party/boringssl/crypto/curve25519/x25519-x86_64.c )
|
||||
s.files += %w( third_party/boringssl/crypto/dh/check.c )
|
||||
|
|
@ -1131,6 +1159,7 @@ Gem::Specification.new do |s|
|
|||
s.files += %w( third_party/boringssl/ssl/tls13_server.cc )
|
||||
s.files += %w( third_party/boringssl/ssl/tls_method.cc )
|
||||
s.files += %w( third_party/boringssl/ssl/tls_record.cc )
|
||||
s.files += %w( third_party/boringssl/third_party/fiat/curve25519.c )
|
||||
s.files += %w( third_party/zlib/crc32.h )
|
||||
s.files += %w( third_party/zlib/deflate.h )
|
||||
s.files += %w( third_party/zlib/gzguts.h )
|
||||
|
|
|
|||
151
grpc.gyp
151
grpc.gyp
|
|
@ -34,6 +34,7 @@
|
|||
'Release': {
|
||||
'cflags': [
|
||||
'-O2',
|
||||
'-Wframe-larger-than=16384',
|
||||
],
|
||||
'defines': [
|
||||
'NDEBUG',
|
||||
|
|
@ -155,6 +156,17 @@
|
|||
]
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'address_sorting',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
],
|
||||
'sources': [
|
||||
'third_party/address_sorting/address_sorting.c',
|
||||
'third_party/address_sorting/address_sorting_posix.c',
|
||||
'third_party/address_sorting/address_sorting_windows.c',
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'alts_test_util',
|
||||
'type': 'static_library',
|
||||
|
|
@ -236,10 +248,13 @@
|
|||
'src/core/lib/channel/channel_args.cc',
|
||||
'src/core/lib/channel/channel_stack.cc',
|
||||
'src/core/lib/channel/channel_stack_builder.cc',
|
||||
'src/core/lib/channel/channel_trace.cc',
|
||||
'src/core/lib/channel/channel_trace_registry.cc',
|
||||
'src/core/lib/channel/connected_channel.cc',
|
||||
'src/core/lib/channel/handshaker.cc',
|
||||
'src/core/lib/channel/handshaker_factory.cc',
|
||||
'src/core/lib/channel/handshaker_registry.cc',
|
||||
'src/core/lib/channel/status_util.cc',
|
||||
'src/core/lib/compression/compression.cc',
|
||||
'src/core/lib/compression/compression_internal.cc',
|
||||
'src/core/lib/compression/message_compress.cc',
|
||||
|
|
@ -273,6 +288,8 @@
|
|||
'src/core/lib/iomgr/gethostname_sysconf.cc',
|
||||
'src/core/lib/iomgr/iocp_windows.cc',
|
||||
'src/core/lib/iomgr/iomgr.cc',
|
||||
'src/core/lib/iomgr/iomgr_custom.cc',
|
||||
'src/core/lib/iomgr/iomgr_internal.cc',
|
||||
'src/core/lib/iomgr/iomgr_posix.cc',
|
||||
'src/core/lib/iomgr/iomgr_uv.cc',
|
||||
'src/core/lib/iomgr/iomgr_windows.cc',
|
||||
|
|
@ -281,12 +298,16 @@
|
|||
'src/core/lib/iomgr/lockfree_event.cc',
|
||||
'src/core/lib/iomgr/network_status_tracker.cc',
|
||||
'src/core/lib/iomgr/polling_entity.cc',
|
||||
'src/core/lib/iomgr/pollset_set_uv.cc',
|
||||
'src/core/lib/iomgr/pollset.cc',
|
||||
'src/core/lib/iomgr/pollset_custom.cc',
|
||||
'src/core/lib/iomgr/pollset_set.cc',
|
||||
'src/core/lib/iomgr/pollset_set_custom.cc',
|
||||
'src/core/lib/iomgr/pollset_set_windows.cc',
|
||||
'src/core/lib/iomgr/pollset_uv.cc',
|
||||
'src/core/lib/iomgr/pollset_windows.cc',
|
||||
'src/core/lib/iomgr/resolve_address.cc',
|
||||
'src/core/lib/iomgr/resolve_address_custom.cc',
|
||||
'src/core/lib/iomgr/resolve_address_posix.cc',
|
||||
'src/core/lib/iomgr/resolve_address_uv.cc',
|
||||
'src/core/lib/iomgr/resolve_address_windows.cc',
|
||||
'src/core/lib/iomgr/resource_quota.cc',
|
||||
'src/core/lib/iomgr/sockaddr_utils.cc',
|
||||
|
|
@ -298,19 +319,24 @@
|
|||
'src/core/lib/iomgr/socket_utils_uv.cc',
|
||||
'src/core/lib/iomgr/socket_utils_windows.cc',
|
||||
'src/core/lib/iomgr/socket_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_client.cc',
|
||||
'src/core/lib/iomgr/tcp_client_custom.cc',
|
||||
'src/core/lib/iomgr/tcp_client_posix.cc',
|
||||
'src/core/lib/iomgr/tcp_client_uv.cc',
|
||||
'src/core/lib/iomgr/tcp_client_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_custom.cc',
|
||||
'src/core/lib/iomgr/tcp_posix.cc',
|
||||
'src/core/lib/iomgr/tcp_server.cc',
|
||||
'src/core/lib/iomgr/tcp_server_custom.cc',
|
||||
'src/core/lib/iomgr/tcp_server_posix.cc',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix_common.cc',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
|
||||
'src/core/lib/iomgr/tcp_server_uv.cc',
|
||||
'src/core/lib/iomgr/tcp_server_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_uv.cc',
|
||||
'src/core/lib/iomgr/tcp_windows.cc',
|
||||
'src/core/lib/iomgr/time_averaged_stats.cc',
|
||||
'src/core/lib/iomgr/timer.cc',
|
||||
'src/core/lib/iomgr/timer_custom.cc',
|
||||
'src/core/lib/iomgr/timer_generic.cc',
|
||||
'src/core/lib/iomgr/timer_heap.cc',
|
||||
'src/core/lib/iomgr/timer_manager.cc',
|
||||
|
|
@ -455,9 +481,9 @@
|
|||
'third_party/nanopb/pb_decode.c',
|
||||
'third_party/nanopb/pb_encode.c',
|
||||
'src/core/tsi/transport_security.cc',
|
||||
'src/core/tsi/transport_security_adapter.cc',
|
||||
'src/core/ext/transport/chttp2/client/insecure/channel_create.cc',
|
||||
'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc',
|
||||
'src/core/ext/transport/chttp2/client/authority.cc',
|
||||
'src/core/ext/transport/chttp2/client/chttp2_connector.cc',
|
||||
'src/core/ext/filters/client_channel/backup_poller.cc',
|
||||
'src/core/ext/filters/client_channel/channel_connectivity.cc',
|
||||
|
|
@ -477,13 +503,15 @@
|
|||
'src/core/ext/filters/client_channel/resolver.cc',
|
||||
'src/core/ext/filters/client_channel/resolver_registry.cc',
|
||||
'src/core/ext/filters/client_channel/retry_throttle.cc',
|
||||
'src/core/ext/filters/client_channel/status_util.cc',
|
||||
'src/core/ext/filters/client_channel/subchannel.cc',
|
||||
'src/core/ext/filters/client_channel/subchannel_index.cc',
|
||||
'src/core/ext/filters/client_channel/uri_parser.cc',
|
||||
'src/core/ext/filters/deadline/deadline_filter.cc',
|
||||
'src/core/tsi/alts_transport_security.cc',
|
||||
'src/core/tsi/fake_transport_security.cc',
|
||||
'src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc',
|
||||
'src/core/tsi/ssl/session_cache/ssl_session_cache.cc',
|
||||
'src/core/tsi/ssl/session_cache/ssl_session_openssl.cc',
|
||||
'src/core/tsi/ssl_transport_security.cc',
|
||||
'src/core/tsi/transport_security_grpc.cc',
|
||||
'src/core/ext/transport/chttp2/server/chttp2_server.cc',
|
||||
|
|
@ -500,7 +528,6 @@
|
|||
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
|
||||
'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc',
|
||||
'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc',
|
||||
'src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc',
|
||||
'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc',
|
||||
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc',
|
||||
|
|
@ -513,6 +540,7 @@
|
|||
'src/core/ext/census/grpc_context.cc',
|
||||
'src/core/ext/filters/max_age/max_age_filter.cc',
|
||||
'src/core/ext/filters/message_size/message_size_filter.cc',
|
||||
'src/core/ext/filters/http/client_authority_filter.cc',
|
||||
'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc',
|
||||
'src/core/ext/filters/workarounds/workaround_utils.cc',
|
||||
'src/core/plugin_registry/grpc_plugin_registry.cc',
|
||||
|
|
@ -548,6 +576,7 @@
|
|||
'test/core/end2end/fixtures/proxy.cc',
|
||||
'test/core/iomgr/endpoint_tests.cc',
|
||||
'test/core/util/debugger_macros.cc',
|
||||
'test/core/util/fuzzer_util.cc',
|
||||
'test/core/util/grpc_profiler.cc',
|
||||
'test/core/util/histogram.cc',
|
||||
'test/core/util/memory_counters.cc',
|
||||
|
|
@ -568,10 +597,13 @@
|
|||
'src/core/lib/channel/channel_args.cc',
|
||||
'src/core/lib/channel/channel_stack.cc',
|
||||
'src/core/lib/channel/channel_stack_builder.cc',
|
||||
'src/core/lib/channel/channel_trace.cc',
|
||||
'src/core/lib/channel/channel_trace_registry.cc',
|
||||
'src/core/lib/channel/connected_channel.cc',
|
||||
'src/core/lib/channel/handshaker.cc',
|
||||
'src/core/lib/channel/handshaker_factory.cc',
|
||||
'src/core/lib/channel/handshaker_registry.cc',
|
||||
'src/core/lib/channel/status_util.cc',
|
||||
'src/core/lib/compression/compression.cc',
|
||||
'src/core/lib/compression/compression_internal.cc',
|
||||
'src/core/lib/compression/message_compress.cc',
|
||||
|
|
@ -605,6 +637,8 @@
|
|||
'src/core/lib/iomgr/gethostname_sysconf.cc',
|
||||
'src/core/lib/iomgr/iocp_windows.cc',
|
||||
'src/core/lib/iomgr/iomgr.cc',
|
||||
'src/core/lib/iomgr/iomgr_custom.cc',
|
||||
'src/core/lib/iomgr/iomgr_internal.cc',
|
||||
'src/core/lib/iomgr/iomgr_posix.cc',
|
||||
'src/core/lib/iomgr/iomgr_uv.cc',
|
||||
'src/core/lib/iomgr/iomgr_windows.cc',
|
||||
|
|
@ -613,12 +647,16 @@
|
|||
'src/core/lib/iomgr/lockfree_event.cc',
|
||||
'src/core/lib/iomgr/network_status_tracker.cc',
|
||||
'src/core/lib/iomgr/polling_entity.cc',
|
||||
'src/core/lib/iomgr/pollset_set_uv.cc',
|
||||
'src/core/lib/iomgr/pollset.cc',
|
||||
'src/core/lib/iomgr/pollset_custom.cc',
|
||||
'src/core/lib/iomgr/pollset_set.cc',
|
||||
'src/core/lib/iomgr/pollset_set_custom.cc',
|
||||
'src/core/lib/iomgr/pollset_set_windows.cc',
|
||||
'src/core/lib/iomgr/pollset_uv.cc',
|
||||
'src/core/lib/iomgr/pollset_windows.cc',
|
||||
'src/core/lib/iomgr/resolve_address.cc',
|
||||
'src/core/lib/iomgr/resolve_address_custom.cc',
|
||||
'src/core/lib/iomgr/resolve_address_posix.cc',
|
||||
'src/core/lib/iomgr/resolve_address_uv.cc',
|
||||
'src/core/lib/iomgr/resolve_address_windows.cc',
|
||||
'src/core/lib/iomgr/resource_quota.cc',
|
||||
'src/core/lib/iomgr/sockaddr_utils.cc',
|
||||
|
|
@ -630,19 +668,24 @@
|
|||
'src/core/lib/iomgr/socket_utils_uv.cc',
|
||||
'src/core/lib/iomgr/socket_utils_windows.cc',
|
||||
'src/core/lib/iomgr/socket_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_client.cc',
|
||||
'src/core/lib/iomgr/tcp_client_custom.cc',
|
||||
'src/core/lib/iomgr/tcp_client_posix.cc',
|
||||
'src/core/lib/iomgr/tcp_client_uv.cc',
|
||||
'src/core/lib/iomgr/tcp_client_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_custom.cc',
|
||||
'src/core/lib/iomgr/tcp_posix.cc',
|
||||
'src/core/lib/iomgr/tcp_server.cc',
|
||||
'src/core/lib/iomgr/tcp_server_custom.cc',
|
||||
'src/core/lib/iomgr/tcp_server_posix.cc',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix_common.cc',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
|
||||
'src/core/lib/iomgr/tcp_server_uv.cc',
|
||||
'src/core/lib/iomgr/tcp_server_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_uv.cc',
|
||||
'src/core/lib/iomgr/tcp_windows.cc',
|
||||
'src/core/lib/iomgr/time_averaged_stats.cc',
|
||||
'src/core/lib/iomgr/timer.cc',
|
||||
'src/core/lib/iomgr/timer_custom.cc',
|
||||
'src/core/lib/iomgr/timer_generic.cc',
|
||||
'src/core/lib/iomgr/timer_heap.cc',
|
||||
'src/core/lib/iomgr/timer_manager.cc',
|
||||
|
|
@ -716,7 +759,6 @@
|
|||
'src/core/ext/filters/client_channel/resolver.cc',
|
||||
'src/core/ext/filters/client_channel/resolver_registry.cc',
|
||||
'src/core/ext/filters/client_channel/retry_throttle.cc',
|
||||
'src/core/ext/filters/client_channel/status_util.cc',
|
||||
'src/core/ext/filters/client_channel/subchannel.cc',
|
||||
'src/core/ext/filters/client_channel/subchannel_index.cc',
|
||||
'src/core/ext/filters/client_channel/uri_parser.cc',
|
||||
|
|
@ -765,6 +807,7 @@
|
|||
'test/core/end2end/fixtures/proxy.cc',
|
||||
'test/core/iomgr/endpoint_tests.cc',
|
||||
'test/core/util/debugger_macros.cc',
|
||||
'test/core/util/fuzzer_util.cc',
|
||||
'test/core/util/grpc_profiler.cc',
|
||||
'test/core/util/histogram.cc',
|
||||
'test/core/util/memory_counters.cc',
|
||||
|
|
@ -785,10 +828,13 @@
|
|||
'src/core/lib/channel/channel_args.cc',
|
||||
'src/core/lib/channel/channel_stack.cc',
|
||||
'src/core/lib/channel/channel_stack_builder.cc',
|
||||
'src/core/lib/channel/channel_trace.cc',
|
||||
'src/core/lib/channel/channel_trace_registry.cc',
|
||||
'src/core/lib/channel/connected_channel.cc',
|
||||
'src/core/lib/channel/handshaker.cc',
|
||||
'src/core/lib/channel/handshaker_factory.cc',
|
||||
'src/core/lib/channel/handshaker_registry.cc',
|
||||
'src/core/lib/channel/status_util.cc',
|
||||
'src/core/lib/compression/compression.cc',
|
||||
'src/core/lib/compression/compression_internal.cc',
|
||||
'src/core/lib/compression/message_compress.cc',
|
||||
|
|
@ -822,6 +868,8 @@
|
|||
'src/core/lib/iomgr/gethostname_sysconf.cc',
|
||||
'src/core/lib/iomgr/iocp_windows.cc',
|
||||
'src/core/lib/iomgr/iomgr.cc',
|
||||
'src/core/lib/iomgr/iomgr_custom.cc',
|
||||
'src/core/lib/iomgr/iomgr_internal.cc',
|
||||
'src/core/lib/iomgr/iomgr_posix.cc',
|
||||
'src/core/lib/iomgr/iomgr_uv.cc',
|
||||
'src/core/lib/iomgr/iomgr_windows.cc',
|
||||
|
|
@ -830,12 +878,16 @@
|
|||
'src/core/lib/iomgr/lockfree_event.cc',
|
||||
'src/core/lib/iomgr/network_status_tracker.cc',
|
||||
'src/core/lib/iomgr/polling_entity.cc',
|
||||
'src/core/lib/iomgr/pollset_set_uv.cc',
|
||||
'src/core/lib/iomgr/pollset.cc',
|
||||
'src/core/lib/iomgr/pollset_custom.cc',
|
||||
'src/core/lib/iomgr/pollset_set.cc',
|
||||
'src/core/lib/iomgr/pollset_set_custom.cc',
|
||||
'src/core/lib/iomgr/pollset_set_windows.cc',
|
||||
'src/core/lib/iomgr/pollset_uv.cc',
|
||||
'src/core/lib/iomgr/pollset_windows.cc',
|
||||
'src/core/lib/iomgr/resolve_address.cc',
|
||||
'src/core/lib/iomgr/resolve_address_custom.cc',
|
||||
'src/core/lib/iomgr/resolve_address_posix.cc',
|
||||
'src/core/lib/iomgr/resolve_address_uv.cc',
|
||||
'src/core/lib/iomgr/resolve_address_windows.cc',
|
||||
'src/core/lib/iomgr/resource_quota.cc',
|
||||
'src/core/lib/iomgr/sockaddr_utils.cc',
|
||||
|
|
@ -847,19 +899,24 @@
|
|||
'src/core/lib/iomgr/socket_utils_uv.cc',
|
||||
'src/core/lib/iomgr/socket_utils_windows.cc',
|
||||
'src/core/lib/iomgr/socket_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_client.cc',
|
||||
'src/core/lib/iomgr/tcp_client_custom.cc',
|
||||
'src/core/lib/iomgr/tcp_client_posix.cc',
|
||||
'src/core/lib/iomgr/tcp_client_uv.cc',
|
||||
'src/core/lib/iomgr/tcp_client_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_custom.cc',
|
||||
'src/core/lib/iomgr/tcp_posix.cc',
|
||||
'src/core/lib/iomgr/tcp_server.cc',
|
||||
'src/core/lib/iomgr/tcp_server_custom.cc',
|
||||
'src/core/lib/iomgr/tcp_server_posix.cc',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix_common.cc',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
|
||||
'src/core/lib/iomgr/tcp_server_uv.cc',
|
||||
'src/core/lib/iomgr/tcp_server_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_uv.cc',
|
||||
'src/core/lib/iomgr/tcp_windows.cc',
|
||||
'src/core/lib/iomgr/time_averaged_stats.cc',
|
||||
'src/core/lib/iomgr/timer.cc',
|
||||
'src/core/lib/iomgr/timer_custom.cc',
|
||||
'src/core/lib/iomgr/timer_generic.cc',
|
||||
'src/core/lib/iomgr/timer_heap.cc',
|
||||
'src/core/lib/iomgr/timer_manager.cc',
|
||||
|
|
@ -933,7 +990,6 @@
|
|||
'src/core/ext/filters/client_channel/resolver.cc',
|
||||
'src/core/ext/filters/client_channel/resolver_registry.cc',
|
||||
'src/core/ext/filters/client_channel/retry_throttle.cc',
|
||||
'src/core/ext/filters/client_channel/status_util.cc',
|
||||
'src/core/ext/filters/client_channel/subchannel.cc',
|
||||
'src/core/ext/filters/client_channel/subchannel_index.cc',
|
||||
'src/core/ext/filters/client_channel/uri_parser.cc',
|
||||
|
|
@ -981,10 +1037,13 @@
|
|||
'src/core/lib/channel/channel_args.cc',
|
||||
'src/core/lib/channel/channel_stack.cc',
|
||||
'src/core/lib/channel/channel_stack_builder.cc',
|
||||
'src/core/lib/channel/channel_trace.cc',
|
||||
'src/core/lib/channel/channel_trace_registry.cc',
|
||||
'src/core/lib/channel/connected_channel.cc',
|
||||
'src/core/lib/channel/handshaker.cc',
|
||||
'src/core/lib/channel/handshaker_factory.cc',
|
||||
'src/core/lib/channel/handshaker_registry.cc',
|
||||
'src/core/lib/channel/status_util.cc',
|
||||
'src/core/lib/compression/compression.cc',
|
||||
'src/core/lib/compression/compression_internal.cc',
|
||||
'src/core/lib/compression/message_compress.cc',
|
||||
|
|
@ -1018,6 +1077,8 @@
|
|||
'src/core/lib/iomgr/gethostname_sysconf.cc',
|
||||
'src/core/lib/iomgr/iocp_windows.cc',
|
||||
'src/core/lib/iomgr/iomgr.cc',
|
||||
'src/core/lib/iomgr/iomgr_custom.cc',
|
||||
'src/core/lib/iomgr/iomgr_internal.cc',
|
||||
'src/core/lib/iomgr/iomgr_posix.cc',
|
||||
'src/core/lib/iomgr/iomgr_uv.cc',
|
||||
'src/core/lib/iomgr/iomgr_windows.cc',
|
||||
|
|
@ -1026,12 +1087,16 @@
|
|||
'src/core/lib/iomgr/lockfree_event.cc',
|
||||
'src/core/lib/iomgr/network_status_tracker.cc',
|
||||
'src/core/lib/iomgr/polling_entity.cc',
|
||||
'src/core/lib/iomgr/pollset_set_uv.cc',
|
||||
'src/core/lib/iomgr/pollset.cc',
|
||||
'src/core/lib/iomgr/pollset_custom.cc',
|
||||
'src/core/lib/iomgr/pollset_set.cc',
|
||||
'src/core/lib/iomgr/pollset_set_custom.cc',
|
||||
'src/core/lib/iomgr/pollset_set_windows.cc',
|
||||
'src/core/lib/iomgr/pollset_uv.cc',
|
||||
'src/core/lib/iomgr/pollset_windows.cc',
|
||||
'src/core/lib/iomgr/resolve_address.cc',
|
||||
'src/core/lib/iomgr/resolve_address_custom.cc',
|
||||
'src/core/lib/iomgr/resolve_address_posix.cc',
|
||||
'src/core/lib/iomgr/resolve_address_uv.cc',
|
||||
'src/core/lib/iomgr/resolve_address_windows.cc',
|
||||
'src/core/lib/iomgr/resource_quota.cc',
|
||||
'src/core/lib/iomgr/sockaddr_utils.cc',
|
||||
|
|
@ -1043,19 +1108,24 @@
|
|||
'src/core/lib/iomgr/socket_utils_uv.cc',
|
||||
'src/core/lib/iomgr/socket_utils_windows.cc',
|
||||
'src/core/lib/iomgr/socket_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_client.cc',
|
||||
'src/core/lib/iomgr/tcp_client_custom.cc',
|
||||
'src/core/lib/iomgr/tcp_client_posix.cc',
|
||||
'src/core/lib/iomgr/tcp_client_uv.cc',
|
||||
'src/core/lib/iomgr/tcp_client_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_custom.cc',
|
||||
'src/core/lib/iomgr/tcp_posix.cc',
|
||||
'src/core/lib/iomgr/tcp_server.cc',
|
||||
'src/core/lib/iomgr/tcp_server_custom.cc',
|
||||
'src/core/lib/iomgr/tcp_server_posix.cc',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix_common.cc',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
|
||||
'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
|
||||
'src/core/lib/iomgr/tcp_server_uv.cc',
|
||||
'src/core/lib/iomgr/tcp_server_windows.cc',
|
||||
'src/core/lib/iomgr/tcp_uv.cc',
|
||||
'src/core/lib/iomgr/tcp_windows.cc',
|
||||
'src/core/lib/iomgr/time_averaged_stats.cc',
|
||||
'src/core/lib/iomgr/timer.cc',
|
||||
'src/core/lib/iomgr/timer_custom.cc',
|
||||
'src/core/lib/iomgr/timer_generic.cc',
|
||||
'src/core/lib/iomgr/timer_heap.cc',
|
||||
'src/core/lib/iomgr/timer_manager.cc',
|
||||
|
|
@ -1143,6 +1213,7 @@
|
|||
'src/core/ext/transport/chttp2/server/chttp2_server.cc',
|
||||
'src/core/ext/transport/chttp2/client/insecure/channel_create.cc',
|
||||
'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc',
|
||||
'src/core/ext/transport/chttp2/client/authority.cc',
|
||||
'src/core/ext/transport/chttp2/client/chttp2_connector.cc',
|
||||
'src/core/ext/filters/client_channel/backup_poller.cc',
|
||||
'src/core/ext/filters/client_channel/channel_connectivity.cc',
|
||||
|
|
@ -1162,7 +1233,6 @@
|
|||
'src/core/ext/filters/client_channel/resolver.cc',
|
||||
'src/core/ext/filters/client_channel/resolver_registry.cc',
|
||||
'src/core/ext/filters/client_channel/retry_throttle.cc',
|
||||
'src/core/ext/filters/client_channel/status_util.cc',
|
||||
'src/core/ext/filters/client_channel/subchannel.cc',
|
||||
'src/core/ext/filters/client_channel/subchannel_index.cc',
|
||||
'src/core/ext/filters/client_channel/uri_parser.cc',
|
||||
|
|
@ -1188,11 +1258,11 @@
|
|||
'third_party/nanopb/pb_decode.c',
|
||||
'third_party/nanopb/pb_encode.c',
|
||||
'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc',
|
||||
'src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc',
|
||||
'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc',
|
||||
'src/core/ext/census/grpc_context.cc',
|
||||
'src/core/ext/filters/max_age/max_age_filter.cc',
|
||||
'src/core/ext/filters/message_size/message_size_filter.cc',
|
||||
'src/core/ext/filters/http/client_authority_filter.cc',
|
||||
'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc',
|
||||
'src/core/ext/filters/workarounds/workaround_utils.cc',
|
||||
'src/core/plugin_registry/grpc_unsecure_plugin_registry.cc',
|
||||
|
|
@ -1271,7 +1341,6 @@
|
|||
'src/cpp/server/server_posix.cc',
|
||||
'src/cpp/thread_manager/thread_manager.cc',
|
||||
'src/cpp/util/byte_buffer_cc.cc',
|
||||
'src/cpp/util/slice_cc.cc',
|
||||
'src/cpp/util/status.cc',
|
||||
'src/cpp/util/string_ref.cc',
|
||||
'src/cpp/util/time_cc.cc',
|
||||
|
|
@ -1343,12 +1412,14 @@
|
|||
'grpc',
|
||||
],
|
||||
'sources': [
|
||||
'src/proto/grpc/channelz/channelz.proto',
|
||||
'src/proto/grpc/health/v1/health.proto',
|
||||
'src/proto/grpc/testing/echo_messages.proto',
|
||||
'src/proto/grpc/testing/echo.proto',
|
||||
'src/proto/grpc/testing/duplicate/echo_duplicate.proto',
|
||||
'test/cpp/end2end/test_service_impl.cc',
|
||||
'test/cpp/util/byte_buffer_proto_helper.cc',
|
||||
'test/cpp/util/channel_trace_proto_helper.cc',
|
||||
'test/cpp/util/create_test_channel.cc',
|
||||
'test/cpp/util/string_ref_helper.cc',
|
||||
'test/cpp/util/subprocess.cc',
|
||||
|
|
@ -1417,7 +1488,6 @@
|
|||
'src/cpp/server/server_posix.cc',
|
||||
'src/cpp/thread_manager/thread_manager.cc',
|
||||
'src/cpp/util/byte_buffer_cc.cc',
|
||||
'src/cpp/util/slice_cc.cc',
|
||||
'src/cpp/util/status.cc',
|
||||
'src/cpp/util/string_ref.cc',
|
||||
'src/cpp/util/time_cc.cc',
|
||||
|
|
@ -1566,6 +1636,16 @@
|
|||
'test/cpp/interop/interop_server_bootstrap.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'lb_load_data_store',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'grpc++',
|
||||
],
|
||||
'sources': [
|
||||
'src/cpp/server/load_reporter/load_data_store.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'qps',
|
||||
'type': 'static_library',
|
||||
|
|
@ -1581,7 +1661,9 @@
|
|||
'src/proto/grpc/testing/payloads.proto',
|
||||
'src/proto/grpc/testing/stats.proto',
|
||||
'src/proto/grpc/testing/control.proto',
|
||||
'src/proto/grpc/testing/services.proto',
|
||||
'src/proto/grpc/testing/benchmark_service.proto',
|
||||
'src/proto/grpc/testing/report_qps_scenario_service.proto',
|
||||
'src/proto/grpc/testing/worker_service.proto',
|
||||
'test/cpp/qps/benchmark_config.cc',
|
||||
'test/cpp/qps/client_async.cc',
|
||||
'test/cpp/qps/client_sync.cc',
|
||||
|
|
@ -1680,7 +1762,6 @@
|
|||
'third_party/boringssl/crypto/cpu-intel.c',
|
||||
'third_party/boringssl/crypto/cpu-ppc64le.c',
|
||||
'third_party/boringssl/crypto/crypto.c',
|
||||
'third_party/boringssl/crypto/curve25519/curve25519.c',
|
||||
'third_party/boringssl/crypto/curve25519/spake25519.c',
|
||||
'third_party/boringssl/crypto/curve25519/x25519-x86_64.c',
|
||||
'third_party/boringssl/crypto/dh/check.c',
|
||||
|
|
@ -1866,6 +1947,7 @@
|
|||
'third_party/boringssl/ssl/tls13_server.cc',
|
||||
'third_party/boringssl/ssl/tls_method.cc',
|
||||
'third_party/boringssl/ssl/tls_record.cc',
|
||||
'third_party/boringssl/third_party/fiat/curve25519.c',
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
@ -1923,6 +2005,17 @@
|
|||
'third_party/boringssl/crypto/bio/bio_test.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'boringssl_buf_test_lib',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'boringssl_test_util',
|
||||
'boringssl',
|
||||
],
|
||||
'sources': [
|
||||
'third_party/boringssl/crypto/buf/buf_test.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'boringssl_bytestring_test_lib',
|
||||
'type': 'static_library',
|
||||
|
|
@ -2493,6 +2586,7 @@
|
|||
'test/core/end2end/tests/bad_ping.cc',
|
||||
'test/core/end2end/tests/binary_metadata.cc',
|
||||
'test/core/end2end/tests/call_creds.cc',
|
||||
'test/core/end2end/tests/call_host_override.cc',
|
||||
'test/core/end2end/tests/cancel_after_accept.cc',
|
||||
'test/core/end2end/tests/cancel_after_client_done.cc',
|
||||
'test/core/end2end/tests/cancel_after_invoke.cc',
|
||||
|
|
@ -2539,6 +2633,7 @@
|
|||
'test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc',
|
||||
'test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc',
|
||||
'test/core/end2end/tests/retry_non_retriable_status.cc',
|
||||
'test/core/end2end/tests/retry_non_retriable_status_before_recv_trailing_metadata_started.cc',
|
||||
'test/core/end2end/tests/retry_recv_initial_metadata.cc',
|
||||
'test/core/end2end/tests/retry_recv_message.cc',
|
||||
'test/core/end2end/tests/retry_server_pushback_delay.cc',
|
||||
|
|
@ -2581,6 +2676,7 @@
|
|||
'test/core/end2end/tests/bad_hostname.cc',
|
||||
'test/core/end2end/tests/bad_ping.cc',
|
||||
'test/core/end2end/tests/binary_metadata.cc',
|
||||
'test/core/end2end/tests/call_host_override.cc',
|
||||
'test/core/end2end/tests/cancel_after_accept.cc',
|
||||
'test/core/end2end/tests/cancel_after_client_done.cc',
|
||||
'test/core/end2end/tests/cancel_after_invoke.cc',
|
||||
|
|
@ -2627,6 +2723,7 @@
|
|||
'test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc',
|
||||
'test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc',
|
||||
'test/core/end2end/tests/retry_non_retriable_status.cc',
|
||||
'test/core/end2end/tests/retry_non_retriable_status_before_recv_trailing_metadata_started.cc',
|
||||
'test/core/end2end/tests/retry_recv_initial_metadata.cc',
|
||||
'test/core/end2end/tests/retry_recv_message.cc',
|
||||
'test/core/end2end/tests/retry_server_pushback_delay.cc',
|
||||
|
|
|
|||
|
|
@ -286,6 +286,14 @@ GRPCAPI grpc_channel* grpc_lame_client_channel_create(
|
|||
/** Close and destroy a grpc channel */
|
||||
GRPCAPI void grpc_channel_destroy(grpc_channel* channel);
|
||||
|
||||
/** Returns the JSON formatted channel trace for this channel. The caller
|
||||
owns the returned string and is responsible for freeing it. */
|
||||
GRPCAPI char* grpc_channel_get_trace(grpc_channel* channel);
|
||||
|
||||
/** Returns the channel uuid, which can be used to look up its trace at a
|
||||
later time. */
|
||||
GRPCAPI intptr_t grpc_channel_get_uuid(grpc_channel* channel);
|
||||
|
||||
/** Error handling for grpc_call
|
||||
Most grpc_call functions return a grpc_error. If the error is not GRPC_OK
|
||||
then the operation failed due to some unsatisfied precondition.
|
||||
|
|
|
|||
|
|
@ -100,6 +100,25 @@ GRPCAPI void grpc_auth_context_add_cstring_property(grpc_auth_context* ctx,
|
|||
GRPCAPI int grpc_auth_context_set_peer_identity_property_name(
|
||||
grpc_auth_context* ctx, const char* name);
|
||||
|
||||
/** --- SSL Session Cache. ---
|
||||
|
||||
A SSL session cache object represents a way to cache client sessions
|
||||
between connections. Only ticket-based resumption is supported. */
|
||||
|
||||
typedef struct grpc_ssl_session_cache grpc_ssl_session_cache;
|
||||
|
||||
/** Create LRU cache for client-side SSL sessions with the given capacity.
|
||||
If capacity is < 1, a default capacity is used instead. */
|
||||
GRPCAPI grpc_ssl_session_cache* grpc_ssl_session_cache_create_lru(
|
||||
size_t capacity);
|
||||
|
||||
/** Destroy SSL session cache. */
|
||||
GRPCAPI void grpc_ssl_session_cache_destroy(grpc_ssl_session_cache* cache);
|
||||
|
||||
/** Create a channel arg with the given cache object. */
|
||||
GRPCAPI grpc_arg
|
||||
grpc_ssl_session_cache_create_channel_arg(grpc_ssl_session_cache* cache);
|
||||
|
||||
/** --- grpc_channel_credentials object. ---
|
||||
|
||||
A channel credentials object represents a way to authenticate a client on a
|
||||
|
|
@ -469,6 +488,76 @@ typedef struct {
|
|||
GRPCAPI void grpc_server_credentials_set_auth_metadata_processor(
|
||||
grpc_server_credentials* creds, grpc_auth_metadata_processor processor);
|
||||
|
||||
/** --- ALTS channel/server credentials --- **/
|
||||
|
||||
/**
|
||||
* Main interface for ALTS credentials options. The options will contain
|
||||
* information that will be passed from grpc to TSI layer such as RPC protocol
|
||||
* versions. ALTS client (channel) and server credentials will have their own
|
||||
* implementation of this interface. The APIs listed in this header are
|
||||
* thread-compatible. It is used for experimental purpose for now and subject
|
||||
* to change.
|
||||
*/
|
||||
typedef struct grpc_alts_credentials_options grpc_alts_credentials_options;
|
||||
|
||||
/**
|
||||
* This method creates a grpc ALTS credentials client options instance.
|
||||
* It is used for experimental purpose for now and subject to change.
|
||||
*/
|
||||
GRPCAPI grpc_alts_credentials_options*
|
||||
grpc_alts_credentials_client_options_create();
|
||||
|
||||
/**
|
||||
* This method creates a grpc ALTS credentials server options instance.
|
||||
* It is used for experimental purpose for now and subject to change.
|
||||
*/
|
||||
GRPCAPI grpc_alts_credentials_options*
|
||||
grpc_alts_credentials_server_options_create();
|
||||
|
||||
/**
|
||||
* This method adds a target service account to grpc client's ALTS credentials
|
||||
* options instance. It is used for experimental purpose for now and subject
|
||||
* to change.
|
||||
*
|
||||
* - options: grpc ALTS credentials options instance.
|
||||
* - service_account: service account of target endpoint.
|
||||
*/
|
||||
GRPCAPI void grpc_alts_credentials_client_options_add_target_service_account(
|
||||
grpc_alts_credentials_options* options, const char* service_account);
|
||||
|
||||
/**
|
||||
* This method destroys a grpc_alts_credentials_options instance by
|
||||
* de-allocating all of its occupied memory. It is used for experimental purpose
|
||||
* for now and subject to change.
|
||||
*
|
||||
* - options: a grpc_alts_credentials_options instance that needs to be
|
||||
* destroyed.
|
||||
*/
|
||||
GRPCAPI void grpc_alts_credentials_options_destroy(
|
||||
grpc_alts_credentials_options* options);
|
||||
|
||||
/**
|
||||
* This method creates an ALTS channel credential object. It is used for
|
||||
* experimental purpose for now and subject to change.
|
||||
*
|
||||
* - options: grpc ALTS credentials options instance for client.
|
||||
*
|
||||
* It returns the created ALTS channel credential object.
|
||||
*/
|
||||
GRPCAPI grpc_channel_credentials* grpc_alts_credentials_create(
|
||||
const grpc_alts_credentials_options* options);
|
||||
|
||||
/**
|
||||
* This method creates an ALTS server credential object. It is used for
|
||||
* experimental purpose for now and subject to change.
|
||||
*
|
||||
* - options: grpc ALTS credentials options instance for server.
|
||||
*
|
||||
* It returns the created ALTS server credential object.
|
||||
*/
|
||||
GRPCAPI grpc_server_credentials* grpc_alts_server_credentials_create(
|
||||
const grpc_alts_credentials_options* options);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ extern "C" {
|
|||
#define GRPC_X509_CN_PROPERTY_NAME "x509_common_name"
|
||||
#define GRPC_X509_SAN_PROPERTY_NAME "x509_subject_alternative_name"
|
||||
#define GRPC_X509_PEM_CERT_PROPERTY_NAME "x509_pem_cert"
|
||||
#define GRPC_SSL_SESSION_REUSED_PROPERTY "ssl_session_reused"
|
||||
|
||||
/** Environment variable that points to the default SSL roots file. This file
|
||||
must be a PEM encoded file with all the roots such as the one that can be
|
||||
|
|
|
|||
|
|
@ -258,6 +258,10 @@ typedef struct {
|
|||
secure channel is an SSL channel). If this parameter is specified and the
|
||||
underlying is not an SSL channel, it will just be ignored. */
|
||||
#define GRPC_SSL_TARGET_NAME_OVERRIDE_ARG "grpc.ssl_target_name_override"
|
||||
/** If non-zero, a pointer to a session cache (a pointer of type
|
||||
grpc_ssl_session_cache*). (use grpc_ssl_session_cache_arg_vtable() to fetch
|
||||
an appropriate pointer arg vtable) */
|
||||
#define GRPC_SSL_SESSION_CACHE_ARG "grpc.ssl_session_cache"
|
||||
/** Maximum metadata size, in bytes. Note this limit applies to the max sum of
|
||||
all metadata key-value entries in a batch of headers. */
|
||||
#define GRPC_ARG_MAX_METADATA_SIZE "grpc.max_metadata_size"
|
||||
|
|
@ -281,6 +285,10 @@ typedef struct {
|
|||
#define GRPC_ARG_SOCKET_MUTATOR "grpc.socket_mutator"
|
||||
/** The grpc_socket_factory instance to create and bind sockets. A pointer. */
|
||||
#define GRPC_ARG_SOCKET_FACTORY "grpc.socket_factory"
|
||||
/** The maximum number of trace events to keep in the tracer for each channel or
|
||||
* subchannel. The default is 10. If set to 0, channel tracing is disabled. */
|
||||
#define GRPC_ARG_MAX_CHANNEL_TRACE_EVENTS_PER_NODE \
|
||||
"grpc.max_channel_trace_events_per_node"
|
||||
/** If non-zero, Cronet transport will coalesce packets to fewer frames
|
||||
* when possible. */
|
||||
#define GRPC_ARG_USE_CRONET_PACKET_COALESCING \
|
||||
|
|
@ -325,6 +333,9 @@ typedef struct {
|
|||
/** Channel arg that carries the bridged objective c object for custom metrics
|
||||
* logging filter. */
|
||||
#define GRPC_ARG_MOBILE_LOG_CONFIG "grpc.mobile_log_config"
|
||||
/** If non-zero, client authority filter is disabled for the channel */
|
||||
#define GRPC_ARG_DISABLE_CLIENT_AUTHORITY_FILTER \
|
||||
"grpc.disable_client_authority_filter"
|
||||
/** \} */
|
||||
|
||||
/** Result of a grpc call. If the caller satisfies the prerequisites of a
|
||||
|
|
|
|||
|
|
@ -500,6 +500,17 @@ typedef unsigned __int64 uint64_t;
|
|||
#endif /* __GPR_WINDOWS */
|
||||
#endif /* GRPC_ALLOW_EXCEPTIONS */
|
||||
|
||||
/* Use GPR_LIKELY only in cases where you are sure that a certain outcome is the
|
||||
* most likely. Ideally, also collect performance numbers to justify the claim.
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
#define GPR_LIKELY(x) __builtin_expect((x), 1)
|
||||
#define GPR_UNLIKELY(x) __builtin_expect((x), 0)
|
||||
#else /* __GNUC__ */
|
||||
#define GPR_LIKELY(x) (x)
|
||||
#define GPR_UNLIKELY(x) (x)
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#ifndef __STDC_FORMAT_MACROS
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ struct grpc_slice {
|
|||
|
||||
/** Represents an expandable array of slices, to be interpreted as a
|
||||
single item. */
|
||||
typedef struct {
|
||||
typedef struct grpc_slice_buffer {
|
||||
/** This is for internal use only. External users (i.e any code outside grpc
|
||||
* core) MUST NOT use this field */
|
||||
grpc_slice* base_slices;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include <grpc/impl/codegen/port_platform.h>
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h> /* for abort() */
|
||||
|
||||
|
|
@ -62,6 +61,8 @@ GPRAPI const char* gpr_log_severity_string(gpr_log_severity severity);
|
|||
GPRAPI void gpr_log(const char* file, int line, gpr_log_severity severity,
|
||||
const char* format, ...) GPR_PRINT_FORMAT_CHECK(4, 5);
|
||||
|
||||
GPRAPI int gpr_should_log(gpr_log_severity severity);
|
||||
|
||||
GPRAPI void gpr_log_message(const char* file, int line,
|
||||
gpr_log_severity severity, const char* message);
|
||||
|
||||
|
|
@ -92,12 +93,18 @@ GPRAPI void gpr_set_log_function(gpr_log_func func);
|
|||
an exception in a higher-level language, consider returning error code. */
|
||||
#define GPR_ASSERT(x) \
|
||||
do { \
|
||||
if (!(x)) { \
|
||||
if (GPR_UNLIKELY(!(x))) { \
|
||||
gpr_log(GPR_ERROR, "assertion failed: %s", #x); \
|
||||
abort(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#ifndef NDEBUG
|
||||
#define GPR_DEBUG_ASSERT(x) GPR_ASSERT(x)
|
||||
#else
|
||||
#define GPR_DEBUG_ASSERT(x)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
///
|
||||
/// Context settings are only relevant to the call they are invoked with, that
|
||||
/// is to say, they aren't sticky. Some of these settings, such as the
|
||||
/// compression options, can be made persistant at channel construction time
|
||||
/// compression options, can be made persistent at channel construction time
|
||||
/// (see \a grpc::CreateCustomChannel).
|
||||
///
|
||||
/// \warning ClientContext instances should \em not be reused across rpcs.
|
||||
|
|
|
|||
|
|
@ -126,9 +126,10 @@ class ClientAsyncResponseReader final
|
|||
assert(started_);
|
||||
GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_);
|
||||
|
||||
meta_buf.set_output_tag(tag);
|
||||
meta_buf.RecvInitialMetadata(context_);
|
||||
call_.PerformOps(&meta_buf);
|
||||
single_buf.set_output_tag(tag);
|
||||
single_buf.RecvInitialMetadata(context_);
|
||||
call_.PerformOps(&single_buf);
|
||||
initial_metadata_read_ = true;
|
||||
}
|
||||
|
||||
/// See \a ClientAysncResponseReaderInterface::Finish for semantics.
|
||||
|
|
@ -138,14 +139,20 @@ class ClientAsyncResponseReader final
|
|||
/// possible initial and trailing metadata sent from the server.
|
||||
void Finish(R* msg, Status* status, void* tag) override {
|
||||
assert(started_);
|
||||
finish_buf.set_output_tag(tag);
|
||||
if (!context_->initial_metadata_received_) {
|
||||
finish_buf.RecvInitialMetadata(context_);
|
||||
if (initial_metadata_read_) {
|
||||
finish_buf.set_output_tag(tag);
|
||||
finish_buf.RecvMessage(msg);
|
||||
finish_buf.AllowNoMessage();
|
||||
finish_buf.ClientRecvStatus(context_, status);
|
||||
call_.PerformOps(&finish_buf);
|
||||
} else {
|
||||
single_buf.set_output_tag(tag);
|
||||
single_buf.RecvInitialMetadata(context_);
|
||||
single_buf.RecvMessage(msg);
|
||||
single_buf.AllowNoMessage();
|
||||
single_buf.ClientRecvStatus(context_, status);
|
||||
call_.PerformOps(&single_buf);
|
||||
}
|
||||
finish_buf.RecvMessage(msg);
|
||||
finish_buf.AllowNoMessage();
|
||||
finish_buf.ClientRecvStatus(context_, status);
|
||||
call_.PerformOps(&finish_buf);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
@ -153,6 +160,7 @@ class ClientAsyncResponseReader final
|
|||
ClientContext* const context_;
|
||||
::grpc::internal::Call call_;
|
||||
bool started_;
|
||||
bool initial_metadata_read_ = false;
|
||||
|
||||
template <class W>
|
||||
ClientAsyncResponseReader(::grpc::internal::Call call, ClientContext* context,
|
||||
|
|
@ -160,30 +168,29 @@ class ClientAsyncResponseReader final
|
|||
: context_(context), call_(call), started_(start) {
|
||||
// Bind the metadata at time of StartCallInternal but set up the rest here
|
||||
// TODO(ctiller): don't assert
|
||||
GPR_CODEGEN_ASSERT(init_buf.SendMessage(request).ok());
|
||||
init_buf.ClientSendClose();
|
||||
GPR_CODEGEN_ASSERT(single_buf.SendMessage(request).ok());
|
||||
single_buf.ClientSendClose();
|
||||
if (start) StartCallInternal();
|
||||
}
|
||||
|
||||
void StartCallInternal() {
|
||||
init_buf.SendInitialMetadata(context_->send_initial_metadata_,
|
||||
context_->initial_metadata_flags());
|
||||
call_.PerformOps(&init_buf);
|
||||
single_buf.SendInitialMetadata(context_->send_initial_metadata_,
|
||||
context_->initial_metadata_flags());
|
||||
}
|
||||
|
||||
// disable operator new
|
||||
static void* operator new(std::size_t size);
|
||||
static void* operator new(std::size_t size, void* p) { return p; }
|
||||
|
||||
::grpc::internal::SneakyCallOpSet<::grpc::internal::CallOpSendInitialMetadata,
|
||||
::grpc::internal::CallOpSendMessage,
|
||||
::grpc::internal::CallOpClientSendClose>
|
||||
init_buf;
|
||||
::grpc::internal::CallOpSet<::grpc::internal::CallOpRecvInitialMetadata>
|
||||
meta_buf;
|
||||
::grpc::internal::CallOpSet<::grpc::internal::CallOpRecvInitialMetadata,
|
||||
::grpc::internal::CallOpSet<::grpc::internal::CallOpSendInitialMetadata,
|
||||
::grpc::internal::CallOpSendMessage,
|
||||
::grpc::internal::CallOpClientSendClose,
|
||||
::grpc::internal::CallOpRecvInitialMetadata,
|
||||
::grpc::internal::CallOpRecvMessage<R>,
|
||||
::grpc::internal::CallOpClientRecvStatus>
|
||||
single_buf;
|
||||
::grpc::internal::CallOpSet<::grpc::internal::CallOpRecvMessage<R>,
|
||||
::grpc::internal::CallOpClientRecvStatus>
|
||||
finish_buf;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@
|
|||
|
||||
namespace grpc {
|
||||
|
||||
class ServerInterface;
|
||||
class ByteBuffer;
|
||||
class ServerInterface;
|
||||
|
||||
namespace internal {
|
||||
class CallOpSendMessage;
|
||||
template <class R>
|
||||
|
|
@ -43,6 +47,7 @@ template <class ServiceType, class RequestType, class ResponseType>
|
|||
class ServerStreamingHandler;
|
||||
template <class R>
|
||||
class DeserializeFuncType;
|
||||
class GrpcByteBufferPeer;
|
||||
} // namespace internal
|
||||
/// A sequence of bytes.
|
||||
class ByteBuffer final {
|
||||
|
|
@ -51,7 +56,30 @@ class ByteBuffer final {
|
|||
ByteBuffer() : buffer_(nullptr) {}
|
||||
|
||||
/// Construct buffer from \a slices, of which there are \a nslices.
|
||||
ByteBuffer(const Slice* slices, size_t nslices);
|
||||
ByteBuffer(const Slice* slices, size_t nslices) {
|
||||
// The following assertions check that the representation of a grpc::Slice
|
||||
// is identical to that of a grpc_slice: it has a grpc_slice field, and
|
||||
// nothing else.
|
||||
static_assert(std::is_same<decltype(slices[0].slice_), grpc_slice>::value,
|
||||
"Slice must have same representation as grpc_slice");
|
||||
static_assert(sizeof(Slice) == sizeof(grpc_slice),
|
||||
"Slice must have same representation as grpc_slice");
|
||||
// The following assertions check that the representation of a ByteBuffer is
|
||||
// identical to grpc_byte_buffer*: it has a grpc_byte_buffer* field,
|
||||
// and nothing else.
|
||||
static_assert(std::is_same<decltype(buffer_), grpc_byte_buffer*>::value,
|
||||
"ByteBuffer must have same representation as "
|
||||
"grpc_byte_buffer*");
|
||||
static_assert(sizeof(ByteBuffer) == sizeof(grpc_byte_buffer*),
|
||||
"ByteBuffer must have same representation as "
|
||||
"grpc_byte_buffer*");
|
||||
// The const_cast is legal if grpc_raw_byte_buffer_create() does no more
|
||||
// than its advertised side effect of increasing the reference count of the
|
||||
// slices it processes, and such an increase does not affect the semantics
|
||||
// seen by the caller of this constructor.
|
||||
buffer_ = g_core_codegen_interface->grpc_raw_byte_buffer_create(
|
||||
reinterpret_cast<grpc_slice*>(const_cast<Slice*>(slices)), nslices);
|
||||
}
|
||||
|
||||
/// Constuct a byte buffer by referencing elements of existing buffer
|
||||
/// \a buf. Wrapper of core function grpc_byte_buffer_copy
|
||||
|
|
@ -88,16 +116,25 @@ class ByteBuffer final {
|
|||
void Release() { buffer_ = nullptr; }
|
||||
|
||||
/// Buffer size in bytes.
|
||||
size_t Length() const;
|
||||
size_t Length() const {
|
||||
return buffer_ == nullptr
|
||||
? 0
|
||||
: g_core_codegen_interface->grpc_byte_buffer_length(buffer_);
|
||||
}
|
||||
|
||||
/// Swap the state of *this and *other.
|
||||
void Swap(ByteBuffer* other);
|
||||
void Swap(ByteBuffer* other) {
|
||||
grpc_byte_buffer* tmp = other->buffer_;
|
||||
other->buffer_ = buffer_;
|
||||
buffer_ = tmp;
|
||||
}
|
||||
|
||||
/// Is this ByteBuffer valid?
|
||||
bool Valid() const { return (buffer_ != nullptr); }
|
||||
|
||||
private:
|
||||
friend class SerializationTraits<ByteBuffer, void>;
|
||||
friend class ServerInterface;
|
||||
friend class internal::CallOpSendMessage;
|
||||
template <class R>
|
||||
friend class internal::CallOpRecvMessage;
|
||||
|
|
@ -109,6 +146,9 @@ class ByteBuffer final {
|
|||
friend class internal::ServerStreamingHandler;
|
||||
template <class R>
|
||||
friend class internal::DeserializeFuncType;
|
||||
friend class ProtoBufferReader;
|
||||
friend class ProtoBufferWriter;
|
||||
friend class internal::GrpcByteBufferPeer;
|
||||
|
||||
grpc_byte_buffer* buffer_;
|
||||
|
||||
|
|
|
|||
|
|
@ -656,21 +656,6 @@ class CallOpSet : public CallOpSetInterface,
|
|||
grpc_call* call_;
|
||||
};
|
||||
|
||||
/// A CallOpSet that does not post completions to the completion queue.
|
||||
///
|
||||
/// Allows hiding some completions that the C core must generate from
|
||||
/// C++ users.
|
||||
template <class Op1 = CallNoOp<1>, class Op2 = CallNoOp<2>,
|
||||
class Op3 = CallNoOp<3>, class Op4 = CallNoOp<4>,
|
||||
class Op5 = CallNoOp<5>, class Op6 = CallNoOp<6>>
|
||||
class SneakyCallOpSet : public CallOpSet<Op1, Op2, Op3, Op4, Op5, Op6> {
|
||||
public:
|
||||
bool FinalizeResult(void** tag, bool* status) override {
|
||||
typedef CallOpSet<Op1, Op2, Op3, Op4, Op5, Op6> Base;
|
||||
return Base::FinalizeResult(tag, status) && false;
|
||||
}
|
||||
};
|
||||
|
||||
/// Straightforward wrapping of the C call object
|
||||
class Call final {
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -365,9 +365,11 @@ class ServerCompletionQueue : public CompletionQueue {
|
|||
public:
|
||||
bool IsFrequentlyPolled() { return polling_type_ != GRPC_CQ_NON_LISTENING; }
|
||||
|
||||
protected:
|
||||
/// Default constructor
|
||||
ServerCompletionQueue() {}
|
||||
|
||||
private:
|
||||
grpc_cq_polling_type polling_type_;
|
||||
friend class ServerBuilder;
|
||||
/// \param is_frequently_polled Informs the GRPC library about whether the
|
||||
/// server completion queue would be actively polled (by calling Next() or
|
||||
/// AsyncNext()). By default all server completion queues are assumed to be
|
||||
|
|
@ -376,6 +378,9 @@ class ServerCompletionQueue : public CompletionQueue {
|
|||
: CompletionQueue(grpc_completion_queue_attributes{
|
||||
GRPC_CQ_CURRENT_VERSION, GRPC_CQ_NEXT, polling_type}),
|
||||
polling_type_(polling_type) {}
|
||||
|
||||
grpc_cq_polling_type polling_type_;
|
||||
friend class ServerBuilder;
|
||||
};
|
||||
|
||||
} // namespace grpc
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ class CoreCodegen final : public CoreCodegenInterface {
|
|||
|
||||
grpc_byte_buffer* grpc_byte_buffer_copy(grpc_byte_buffer* bb) override;
|
||||
void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) override;
|
||||
size_t grpc_byte_buffer_length(grpc_byte_buffer* bb) override;
|
||||
|
||||
int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader,
|
||||
grpc_byte_buffer* buffer) override;
|
||||
|
|
@ -86,6 +87,8 @@ class CoreCodegen final : public CoreCodegenInterface {
|
|||
grpc_slice grpc_slice_new_with_user_data(void* p, size_t len,
|
||||
void (*destroy)(void*),
|
||||
void* user_data) override;
|
||||
grpc_slice grpc_slice_new_with_len(void* p, size_t len,
|
||||
void (*destroy)(void*, size_t)) override;
|
||||
grpc_slice grpc_empty_slice() override;
|
||||
grpc_slice grpc_slice_malloc(size_t length) override;
|
||||
void grpc_slice_unref(grpc_slice slice) override;
|
||||
|
|
|
|||
|
|
@ -81,6 +81,8 @@ class CoreCodegenInterface {
|
|||
|
||||
virtual grpc_byte_buffer* grpc_byte_buffer_copy(grpc_byte_buffer* bb) = 0;
|
||||
virtual void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) = 0;
|
||||
virtual size_t grpc_byte_buffer_length(grpc_byte_buffer* bb)
|
||||
GRPC_MUST_USE_RESULT = 0;
|
||||
|
||||
virtual int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader,
|
||||
grpc_byte_buffer* buffer)
|
||||
|
|
@ -95,6 +97,9 @@ class CoreCodegenInterface {
|
|||
virtual grpc_slice grpc_slice_new_with_user_data(void* p, size_t len,
|
||||
void (*destroy)(void*),
|
||||
void* user_data) = 0;
|
||||
virtual grpc_slice grpc_slice_new_with_len(void* p, size_t len,
|
||||
void (*destroy)(void*,
|
||||
size_t)) = 0;
|
||||
virtual grpc_call_error grpc_call_cancel_with_status(grpc_call* call,
|
||||
grpc_status_code status,
|
||||
const char* description,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,151 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2015 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef GRPCPP_IMPL_CODEGEN_PROTO_BUFFER_READER_H
|
||||
#define GRPCPP_IMPL_CODEGEN_PROTO_BUFFER_READER_H
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <grpc/impl/codegen/byte_buffer_reader.h>
|
||||
#include <grpc/impl/codegen/grpc_types.h>
|
||||
#include <grpc/impl/codegen/slice.h>
|
||||
#include <grpcpp/impl/codegen/byte_buffer.h>
|
||||
#include <grpcpp/impl/codegen/config_protobuf.h>
|
||||
#include <grpcpp/impl/codegen/core_codegen_interface.h>
|
||||
#include <grpcpp/impl/codegen/serialization_traits.h>
|
||||
#include <grpcpp/impl/codegen/status.h>
|
||||
|
||||
/// This header provides an object that reads bytes directly from a
|
||||
/// grpc::ByteBuffer, via the ZeroCopyInputStream interface
|
||||
|
||||
namespace grpc {
|
||||
|
||||
extern CoreCodegenInterface* g_core_codegen_interface;
|
||||
|
||||
/// This is a specialization of the protobuf class ZeroCopyInputStream
|
||||
/// The principle is to get one chunk of data at a time from the proto layer,
|
||||
/// with options to backup (re-see some bytes) or skip (forward past some bytes)
|
||||
///
|
||||
/// Read more about ZeroCopyInputStream interface here:
|
||||
/// https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.io.zero_copy_stream#ZeroCopyInputStream
|
||||
class ProtoBufferReader : public ::grpc::protobuf::io::ZeroCopyInputStream {
|
||||
public:
|
||||
/// Constructs buffer reader from \a buffer. Will set \a status() to non ok
|
||||
/// if \a buffer is invalid (the internal buffer has not been initialized).
|
||||
explicit ProtoBufferReader(ByteBuffer* buffer)
|
||||
: byte_count_(0), backup_count_(0), status_() {
|
||||
/// Implemented through a grpc_byte_buffer_reader which iterates
|
||||
/// over the slices that make up a byte buffer
|
||||
if (!buffer->Valid() ||
|
||||
!g_core_codegen_interface->grpc_byte_buffer_reader_init(
|
||||
&reader_, buffer->c_buffer())) {
|
||||
status_ = Status(StatusCode::INTERNAL,
|
||||
"Couldn't initialize byte buffer reader");
|
||||
}
|
||||
}
|
||||
|
||||
~ProtoBufferReader() {
|
||||
if (status_.ok()) {
|
||||
g_core_codegen_interface->grpc_byte_buffer_reader_destroy(&reader_);
|
||||
}
|
||||
}
|
||||
|
||||
/// Give the proto library a chunk of data from the stream. The caller
|
||||
/// may safely read from data[0, size - 1].
|
||||
bool Next(const void** data, int* size) override {
|
||||
if (!status_.ok()) {
|
||||
return false;
|
||||
}
|
||||
/// If we have backed up previously, we need to return the backed-up slice
|
||||
if (backup_count_ > 0) {
|
||||
*data = GRPC_SLICE_START_PTR(slice_) + GRPC_SLICE_LENGTH(slice_) -
|
||||
backup_count_;
|
||||
GPR_CODEGEN_ASSERT(backup_count_ <= INT_MAX);
|
||||
*size = (int)backup_count_;
|
||||
backup_count_ = 0;
|
||||
return true;
|
||||
}
|
||||
/// Otherwise get the next slice from the byte buffer reader
|
||||
if (!g_core_codegen_interface->grpc_byte_buffer_reader_next(&reader_,
|
||||
&slice_)) {
|
||||
return false;
|
||||
}
|
||||
g_core_codegen_interface->grpc_slice_unref(slice_);
|
||||
*data = GRPC_SLICE_START_PTR(slice_);
|
||||
// On win x64, int is only 32bit
|
||||
GPR_CODEGEN_ASSERT(GRPC_SLICE_LENGTH(slice_) <= INT_MAX);
|
||||
byte_count_ += * size = (int)GRPC_SLICE_LENGTH(slice_);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// Returns the status of the buffer reader.
|
||||
Status status() const { return status_; }
|
||||
|
||||
/// The proto library calls this to indicate that we should back up \a count
|
||||
/// bytes that have already been returned by the last call of Next.
|
||||
/// So do the backup and have that ready for a later Next.
|
||||
void BackUp(int count) override {
|
||||
GPR_CODEGEN_ASSERT(count <= static_cast<int>(GRPC_SLICE_LENGTH(slice_)));
|
||||
backup_count_ = count;
|
||||
}
|
||||
|
||||
/// The proto library calls this to skip over \a count bytes. Implement this
|
||||
/// using Next and BackUp combined.
|
||||
bool Skip(int count) override {
|
||||
const void* data;
|
||||
int size;
|
||||
while (Next(&data, &size)) {
|
||||
if (size >= count) {
|
||||
BackUp(size - count);
|
||||
return true;
|
||||
}
|
||||
// size < count;
|
||||
count -= size;
|
||||
}
|
||||
// error or we have too large count;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Returns the total number of bytes read since this object was created.
|
||||
grpc::protobuf::int64 ByteCount() const override {
|
||||
return byte_count_ - backup_count_;
|
||||
}
|
||||
|
||||
// These protected members are needed to support internal optimizations.
|
||||
// they expose internal bits of grpc core that are NOT stable. If you have
|
||||
// a use case needs to use one of these functions, please send an email to
|
||||
// https://groups.google.com/forum/#!forum/grpc-io.
|
||||
protected:
|
||||
void set_byte_count(int64_t byte_count) { byte_count_ = byte_count; }
|
||||
int64_t backup_count() { return backup_count_; }
|
||||
void set_backup_count(int64_t backup_count) { backup_count_ = backup_count; }
|
||||
grpc_byte_buffer_reader* reader() { return &reader_; }
|
||||
grpc_slice* slice() { return &slice_; }
|
||||
|
||||
private:
|
||||
int64_t byte_count_; ///< total bytes read since object creation
|
||||
int64_t backup_count_; ///< how far backed up in the stream we are
|
||||
grpc_byte_buffer_reader reader_; ///< internal object to read \a grpc_slice
|
||||
///< from the \a grpc_byte_buffer
|
||||
grpc_slice slice_; ///< current slice passed back to the caller
|
||||
Status status_; ///< status of the entire object
|
||||
};
|
||||
|
||||
} // namespace grpc
|
||||
|
||||
#endif // GRPCPP_IMPL_CODEGEN_PROTO_BUFFER_READER_H
|
||||
|
|
@ -0,0 +1,167 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2018 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef GRPCPP_IMPL_CODEGEN_PROTO_BUFFER_WRITER_H
|
||||
#define GRPCPP_IMPL_CODEGEN_PROTO_BUFFER_WRITER_H
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <grpc/impl/codegen/grpc_types.h>
|
||||
#include <grpc/impl/codegen/slice.h>
|
||||
#include <grpcpp/impl/codegen/byte_buffer.h>
|
||||
#include <grpcpp/impl/codegen/config_protobuf.h>
|
||||
#include <grpcpp/impl/codegen/core_codegen_interface.h>
|
||||
#include <grpcpp/impl/codegen/serialization_traits.h>
|
||||
#include <grpcpp/impl/codegen/status.h>
|
||||
|
||||
/// This header provides an object that writes bytes directly into a
|
||||
/// grpc::ByteBuffer, via the ZeroCopyOutputStream interface
|
||||
|
||||
namespace grpc {
|
||||
|
||||
extern CoreCodegenInterface* g_core_codegen_interface;
|
||||
|
||||
// Forward declaration for testing use only
|
||||
namespace internal {
|
||||
class ProtoBufferWriterPeer;
|
||||
} // namespace internal
|
||||
|
||||
const int kProtoBufferWriterMaxBufferLength = 1024 * 1024;
|
||||
|
||||
/// This is a specialization of the protobuf class ZeroCopyOutputStream.
|
||||
/// The principle is to give the proto layer one buffer of bytes at a time
|
||||
/// that it can use to serialize the next portion of the message, with the
|
||||
/// option to "backup" if more buffer is given than required at the last buffer.
|
||||
///
|
||||
/// Read more about ZeroCopyOutputStream interface here:
|
||||
/// https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.io.zero_copy_stream#ZeroCopyOutputStream
|
||||
class ProtoBufferWriter : public ::grpc::protobuf::io::ZeroCopyOutputStream {
|
||||
public:
|
||||
/// Constructor for this derived class
|
||||
///
|
||||
/// \param[out] byte_buffer A pointer to the grpc::ByteBuffer created
|
||||
/// \param block_size How big are the chunks to allocate at a time
|
||||
/// \param total_size How many total bytes are required for this proto
|
||||
ProtoBufferWriter(ByteBuffer* byte_buffer, int block_size, int total_size)
|
||||
: block_size_(block_size),
|
||||
total_size_(total_size),
|
||||
byte_count_(0),
|
||||
have_backup_(false) {
|
||||
GPR_CODEGEN_ASSERT(!byte_buffer->Valid());
|
||||
/// Create an empty raw byte buffer and look at its underlying slice buffer
|
||||
grpc_byte_buffer* bp =
|
||||
g_core_codegen_interface->grpc_raw_byte_buffer_create(NULL, 0);
|
||||
byte_buffer->set_buffer(bp);
|
||||
slice_buffer_ = &bp->data.raw.slice_buffer;
|
||||
}
|
||||
|
||||
~ProtoBufferWriter() {
|
||||
if (have_backup_) {
|
||||
g_core_codegen_interface->grpc_slice_unref(backup_slice_);
|
||||
}
|
||||
}
|
||||
|
||||
/// Give the proto library the next buffer of bytes and its size. It is
|
||||
/// safe for the caller to write from data[0, size - 1].
|
||||
bool Next(void** data, int* size) override {
|
||||
// Protobuf should not ask for more memory than total_size_.
|
||||
GPR_CODEGEN_ASSERT(byte_count_ < total_size_);
|
||||
// 1. Use the remaining backup slice if we have one
|
||||
// 2. Otherwise allocate a slice, up to the remaining length needed
|
||||
// or our maximum allocation size
|
||||
// 3. Provide the slice start and size available
|
||||
// 4. Add the slice being returned to the slice buffer
|
||||
size_t remain = total_size_ - byte_count_;
|
||||
if (have_backup_) {
|
||||
/// If we have a backup slice, we should use it first
|
||||
slice_ = backup_slice_;
|
||||
have_backup_ = false;
|
||||
if (GRPC_SLICE_LENGTH(slice_) > remain) {
|
||||
GRPC_SLICE_SET_LENGTH(slice_, remain);
|
||||
}
|
||||
} else {
|
||||
// When less than a whole block is needed, only allocate that much.
|
||||
// But make sure the allocated slice is not inlined.
|
||||
size_t allocate_length =
|
||||
remain > static_cast<size_t>(block_size_) ? block_size_ : remain;
|
||||
slice_ = g_core_codegen_interface->grpc_slice_malloc(
|
||||
allocate_length > GRPC_SLICE_INLINED_SIZE
|
||||
? allocate_length
|
||||
: GRPC_SLICE_INLINED_SIZE + 1);
|
||||
}
|
||||
*data = GRPC_SLICE_START_PTR(slice_);
|
||||
// On win x64, int is only 32bit
|
||||
GPR_CODEGEN_ASSERT(GRPC_SLICE_LENGTH(slice_) <= INT_MAX);
|
||||
byte_count_ += * size = (int)GRPC_SLICE_LENGTH(slice_);
|
||||
g_core_codegen_interface->grpc_slice_buffer_add(slice_buffer_, slice_);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// Backup by \a count bytes because Next returned more bytes than needed
|
||||
/// (only used in the last buffer). \a count must be less than or equal too
|
||||
/// the last buffer returned from next.
|
||||
void BackUp(int count) override {
|
||||
/// 1. Remove the partially-used last slice from the slice buffer
|
||||
/// 2. Split it into the needed (if any) and unneeded part
|
||||
/// 3. Add the needed part back to the slice buffer
|
||||
/// 4. Mark that we still have the remaining part (for later use/unref)
|
||||
GPR_CODEGEN_ASSERT(count <= static_cast<int>(GRPC_SLICE_LENGTH(slice_)));
|
||||
g_core_codegen_interface->grpc_slice_buffer_pop(slice_buffer_);
|
||||
if ((size_t)count == GRPC_SLICE_LENGTH(slice_)) {
|
||||
backup_slice_ = slice_;
|
||||
} else {
|
||||
backup_slice_ = g_core_codegen_interface->grpc_slice_split_tail(
|
||||
&slice_, GRPC_SLICE_LENGTH(slice_) - count);
|
||||
g_core_codegen_interface->grpc_slice_buffer_add(slice_buffer_, slice_);
|
||||
}
|
||||
// It's dangerous to keep an inlined grpc_slice as the backup slice, since
|
||||
// on a following Next() call, a reference will be returned to this slice
|
||||
// via GRPC_SLICE_START_PTR, which will not be an address held by
|
||||
// slice_buffer_.
|
||||
have_backup_ = backup_slice_.refcount != NULL;
|
||||
byte_count_ -= count;
|
||||
}
|
||||
|
||||
/// Returns the total number of bytes written since this object was created.
|
||||
grpc::protobuf::int64 ByteCount() const override { return byte_count_; }
|
||||
|
||||
// These protected members are needed to support internal optimizations.
|
||||
// they expose internal bits of grpc core that are NOT stable. If you have
|
||||
// a use case needs to use one of these functions, please send an email to
|
||||
// https://groups.google.com/forum/#!forum/grpc-io.
|
||||
protected:
|
||||
grpc_slice_buffer* slice_buffer() { return slice_buffer_; }
|
||||
void set_byte_count(int64_t byte_count) { byte_count_ = byte_count; }
|
||||
|
||||
private:
|
||||
// friend for testing purposes only
|
||||
friend class internal::ProtoBufferWriterPeer;
|
||||
const int block_size_; ///< size to alloc for each new \a grpc_slice needed
|
||||
const int total_size_; ///< byte size of proto being serialized
|
||||
int64_t byte_count_; ///< bytes written since this object was created
|
||||
grpc_slice_buffer*
|
||||
slice_buffer_; ///< internal buffer of slices holding the serialized data
|
||||
bool have_backup_; ///< if we are holding a backup slice or not
|
||||
grpc_slice backup_slice_; ///< holds space we can still write to, if the
|
||||
///< caller has called BackUp
|
||||
grpc_slice slice_; ///< current slice passed back to the caller
|
||||
};
|
||||
|
||||
} // namespace grpc
|
||||
|
||||
#endif // GRPCPP_IMPL_CODEGEN_PROTO_BUFFER_WRITER_H
|
||||
|
|
@ -24,203 +24,61 @@
|
|||
#include <grpc/impl/codegen/byte_buffer_reader.h>
|
||||
#include <grpc/impl/codegen/grpc_types.h>
|
||||
#include <grpc/impl/codegen/slice.h>
|
||||
#include <grpcpp/impl/codegen/byte_buffer.h>
|
||||
#include <grpcpp/impl/codegen/config_protobuf.h>
|
||||
#include <grpcpp/impl/codegen/core_codegen_interface.h>
|
||||
#include <grpcpp/impl/codegen/proto_buffer_reader.h>
|
||||
#include <grpcpp/impl/codegen/proto_buffer_writer.h>
|
||||
#include <grpcpp/impl/codegen/serialization_traits.h>
|
||||
#include <grpcpp/impl/codegen/slice.h>
|
||||
#include <grpcpp/impl/codegen/status.h>
|
||||
|
||||
/// This header provides serialization and deserialization between gRPC
|
||||
/// messages serialized using protobuf and the C++ objects they represent.
|
||||
|
||||
namespace grpc {
|
||||
|
||||
extern CoreCodegenInterface* g_core_codegen_interface;
|
||||
|
||||
namespace internal {
|
||||
|
||||
class GrpcBufferWriterPeer;
|
||||
|
||||
const int kGrpcBufferWriterMaxBufferLength = 1024 * 1024;
|
||||
|
||||
class GrpcBufferWriter : public ::grpc::protobuf::io::ZeroCopyOutputStream {
|
||||
public:
|
||||
GrpcBufferWriter(grpc_byte_buffer** bp, int block_size, int total_size)
|
||||
: block_size_(block_size),
|
||||
total_size_(total_size),
|
||||
byte_count_(0),
|
||||
have_backup_(false) {
|
||||
*bp = g_core_codegen_interface->grpc_raw_byte_buffer_create(NULL, 0);
|
||||
slice_buffer_ = &(*bp)->data.raw.slice_buffer;
|
||||
}
|
||||
|
||||
~GrpcBufferWriter() override {
|
||||
if (have_backup_) {
|
||||
g_core_codegen_interface->grpc_slice_unref(backup_slice_);
|
||||
}
|
||||
}
|
||||
|
||||
bool Next(void** data, int* size) override {
|
||||
// Protobuf should not ask for more memory than total_size_.
|
||||
GPR_CODEGEN_ASSERT(byte_count_ < total_size_);
|
||||
size_t remain = total_size_ - byte_count_;
|
||||
if (have_backup_) {
|
||||
slice_ = backup_slice_;
|
||||
have_backup_ = false;
|
||||
if (GRPC_SLICE_LENGTH(slice_) > remain) {
|
||||
GRPC_SLICE_SET_LENGTH(slice_, remain);
|
||||
}
|
||||
} else {
|
||||
// When less than a whole block is needed, only allocate that much.
|
||||
// But make sure the allocated slice is not inlined.
|
||||
size_t allocate_length =
|
||||
remain > static_cast<size_t>(block_size_) ? block_size_ : remain;
|
||||
slice_ = g_core_codegen_interface->grpc_slice_malloc(
|
||||
allocate_length > GRPC_SLICE_INLINED_SIZE
|
||||
? allocate_length
|
||||
: GRPC_SLICE_INLINED_SIZE + 1);
|
||||
}
|
||||
*data = GRPC_SLICE_START_PTR(slice_);
|
||||
// On win x64, int is only 32bit
|
||||
GPR_CODEGEN_ASSERT(GRPC_SLICE_LENGTH(slice_) <= INT_MAX);
|
||||
byte_count_ += * size = (int)GRPC_SLICE_LENGTH(slice_);
|
||||
g_core_codegen_interface->grpc_slice_buffer_add(slice_buffer_, slice_);
|
||||
return true;
|
||||
}
|
||||
|
||||
void BackUp(int count) override {
|
||||
g_core_codegen_interface->grpc_slice_buffer_pop(slice_buffer_);
|
||||
if ((size_t)count == GRPC_SLICE_LENGTH(slice_)) {
|
||||
backup_slice_ = slice_;
|
||||
} else {
|
||||
backup_slice_ = g_core_codegen_interface->grpc_slice_split_tail(
|
||||
&slice_, GRPC_SLICE_LENGTH(slice_) - count);
|
||||
g_core_codegen_interface->grpc_slice_buffer_add(slice_buffer_, slice_);
|
||||
}
|
||||
// It's dangerous to keep an inlined grpc_slice as the backup slice, since
|
||||
// on a following Next() call, a reference will be returned to this slice
|
||||
// via GRPC_SLICE_START_PTR, which will not be an adddress held by
|
||||
// slice_buffer_.
|
||||
have_backup_ = backup_slice_.refcount != NULL;
|
||||
byte_count_ -= count;
|
||||
}
|
||||
|
||||
grpc::protobuf::int64 ByteCount() const override { return byte_count_; }
|
||||
|
||||
protected:
|
||||
friend class GrpcBufferWriterPeer;
|
||||
const int block_size_;
|
||||
const int total_size_;
|
||||
int64_t byte_count_;
|
||||
grpc_slice_buffer* slice_buffer_;
|
||||
bool have_backup_;
|
||||
grpc_slice backup_slice_;
|
||||
grpc_slice slice_;
|
||||
};
|
||||
|
||||
class GrpcBufferReader : public ::grpc::protobuf::io::ZeroCopyInputStream {
|
||||
public:
|
||||
explicit GrpcBufferReader(grpc_byte_buffer* buffer)
|
||||
: byte_count_(0), backup_count_(0), status_() {
|
||||
if (!g_core_codegen_interface->grpc_byte_buffer_reader_init(&reader_,
|
||||
buffer)) {
|
||||
status_ = Status(StatusCode::INTERNAL,
|
||||
"Couldn't initialize byte buffer reader");
|
||||
}
|
||||
}
|
||||
~GrpcBufferReader() override {
|
||||
g_core_codegen_interface->grpc_byte_buffer_reader_destroy(&reader_);
|
||||
}
|
||||
|
||||
bool Next(const void** data, int* size) override {
|
||||
if (!status_.ok()) {
|
||||
return false;
|
||||
}
|
||||
if (backup_count_ > 0) {
|
||||
*data = GRPC_SLICE_START_PTR(slice_) + GRPC_SLICE_LENGTH(slice_) -
|
||||
backup_count_;
|
||||
GPR_CODEGEN_ASSERT(backup_count_ <= INT_MAX);
|
||||
*size = (int)backup_count_;
|
||||
backup_count_ = 0;
|
||||
return true;
|
||||
}
|
||||
if (!g_core_codegen_interface->grpc_byte_buffer_reader_next(&reader_,
|
||||
&slice_)) {
|
||||
return false;
|
||||
}
|
||||
g_core_codegen_interface->grpc_slice_unref(slice_);
|
||||
*data = GRPC_SLICE_START_PTR(slice_);
|
||||
// On win x64, int is only 32bit
|
||||
GPR_CODEGEN_ASSERT(GRPC_SLICE_LENGTH(slice_) <= INT_MAX);
|
||||
byte_count_ += * size = (int)GRPC_SLICE_LENGTH(slice_);
|
||||
return true;
|
||||
}
|
||||
|
||||
Status status() const { return status_; }
|
||||
|
||||
void BackUp(int count) override { backup_count_ = count; }
|
||||
|
||||
bool Skip(int count) override {
|
||||
const void* data;
|
||||
int size;
|
||||
while (Next(&data, &size)) {
|
||||
if (size >= count) {
|
||||
BackUp(size - count);
|
||||
return true;
|
||||
}
|
||||
// size < count;
|
||||
count -= size;
|
||||
}
|
||||
// error or we have too large count;
|
||||
return false;
|
||||
}
|
||||
|
||||
grpc::protobuf::int64 ByteCount() const override {
|
||||
return byte_count_ - backup_count_;
|
||||
}
|
||||
|
||||
protected:
|
||||
int64_t byte_count_;
|
||||
int64_t backup_count_;
|
||||
grpc_byte_buffer_reader reader_;
|
||||
grpc_slice slice_;
|
||||
Status status_;
|
||||
};
|
||||
|
||||
// BufferWriter must be a subclass of io::ZeroCopyOutputStream.
|
||||
template <class BufferWriter, class T>
|
||||
Status GenericSerialize(const grpc::protobuf::Message& msg,
|
||||
grpc_byte_buffer** bp, bool* own_buffer) {
|
||||
static_assert(
|
||||
std::is_base_of<protobuf::io::ZeroCopyOutputStream, BufferWriter>::value,
|
||||
"BufferWriter must be a subclass of io::ZeroCopyOutputStream");
|
||||
// ProtoBufferWriter must be a subclass of ::protobuf::io::ZeroCopyOutputStream.
|
||||
template <class ProtoBufferWriter, class T>
|
||||
Status GenericSerialize(const grpc::protobuf::Message& msg, ByteBuffer* bb,
|
||||
bool* own_buffer) {
|
||||
static_assert(std::is_base_of<protobuf::io::ZeroCopyOutputStream,
|
||||
ProtoBufferWriter>::value,
|
||||
"ProtoBufferWriter must be a subclass of "
|
||||
"::protobuf::io::ZeroCopyOutputStream");
|
||||
*own_buffer = true;
|
||||
int byte_size = msg.ByteSize();
|
||||
if ((size_t)byte_size <= GRPC_SLICE_INLINED_SIZE) {
|
||||
grpc_slice slice = g_core_codegen_interface->grpc_slice_malloc(byte_size);
|
||||
GPR_CODEGEN_ASSERT(
|
||||
GRPC_SLICE_END_PTR(slice) ==
|
||||
msg.SerializeWithCachedSizesToArray(GRPC_SLICE_START_PTR(slice)));
|
||||
*bp = g_core_codegen_interface->grpc_raw_byte_buffer_create(&slice, 1);
|
||||
g_core_codegen_interface->grpc_slice_unref(slice);
|
||||
Slice slice(byte_size);
|
||||
// We serialize directly into the allocated slices memory
|
||||
GPR_CODEGEN_ASSERT(slice.end() == msg.SerializeWithCachedSizesToArray(
|
||||
const_cast<uint8_t*>(slice.begin())));
|
||||
ByteBuffer tmp(&slice, 1);
|
||||
bb->Swap(&tmp);
|
||||
|
||||
return g_core_codegen_interface->ok();
|
||||
}
|
||||
BufferWriter writer(bp, kGrpcBufferWriterMaxBufferLength, byte_size);
|
||||
ProtoBufferWriter writer(bb, kProtoBufferWriterMaxBufferLength, byte_size);
|
||||
return msg.SerializeToZeroCopyStream(&writer)
|
||||
? g_core_codegen_interface->ok()
|
||||
: Status(StatusCode::INTERNAL, "Failed to serialize message");
|
||||
}
|
||||
|
||||
// BufferReader must be a subclass of io::ZeroCopyInputStream.
|
||||
template <class BufferReader, class T>
|
||||
Status GenericDeserialize(grpc_byte_buffer* buffer,
|
||||
grpc::protobuf::Message* msg) {
|
||||
static_assert(
|
||||
std::is_base_of<protobuf::io::ZeroCopyInputStream, BufferReader>::value,
|
||||
"BufferReader must be a subclass of io::ZeroCopyInputStream");
|
||||
// BufferReader must be a subclass of ::protobuf::io::ZeroCopyInputStream.
|
||||
template <class ProtoBufferReader, class T>
|
||||
Status GenericDeserialize(ByteBuffer* buffer, grpc::protobuf::Message* msg) {
|
||||
static_assert(std::is_base_of<protobuf::io::ZeroCopyInputStream,
|
||||
ProtoBufferReader>::value,
|
||||
"ProtoBufferReader must be a subclass of "
|
||||
"::protobuf::io::ZeroCopyInputStream");
|
||||
if (buffer == nullptr) {
|
||||
return Status(StatusCode::INTERNAL, "No payload");
|
||||
}
|
||||
Status result = g_core_codegen_interface->ok();
|
||||
{
|
||||
BufferReader reader(buffer);
|
||||
ProtoBufferReader reader(buffer);
|
||||
if (!reader.status().ok()) {
|
||||
return reader.status();
|
||||
}
|
||||
|
|
@ -233,12 +91,10 @@ Status GenericDeserialize(grpc_byte_buffer* buffer,
|
|||
result = Status(StatusCode::INTERNAL, "Did not read entire message");
|
||||
}
|
||||
}
|
||||
g_core_codegen_interface->grpc_byte_buffer_destroy(buffer);
|
||||
buffer->Clear();
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
|
||||
// this is needed so the following class does not conflict with protobuf
|
||||
// serializers that utilize internal-only tools.
|
||||
#ifdef GRPC_OPEN_SOURCE_PROTO
|
||||
|
|
@ -249,16 +105,13 @@ template <class T>
|
|||
class SerializationTraits<T, typename std::enable_if<std::is_base_of<
|
||||
grpc::protobuf::Message, T>::value>::type> {
|
||||
public:
|
||||
static Status Serialize(const grpc::protobuf::Message& msg,
|
||||
grpc_byte_buffer** bp, bool* own_buffer) {
|
||||
return internal::GenericSerialize<internal::GrpcBufferWriter, T>(
|
||||
msg, bp, own_buffer);
|
||||
static Status Serialize(const grpc::protobuf::Message& msg, ByteBuffer* bb,
|
||||
bool* own_buffer) {
|
||||
return GenericSerialize<ProtoBufferWriter, T>(msg, bb, own_buffer);
|
||||
}
|
||||
|
||||
static Status Deserialize(grpc_byte_buffer* buffer,
|
||||
grpc::protobuf::Message* msg) {
|
||||
return internal::GenericDeserialize<internal::GrpcBufferReader, T>(buffer,
|
||||
msg);
|
||||
static Status Deserialize(ByteBuffer* buffer, grpc::protobuf::Message* msg) {
|
||||
return GenericDeserialize<ProtoBufferReader, T>(buffer, msg);
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -88,8 +88,8 @@ class ServerContextTestSpouse;
|
|||
///
|
||||
/// Context settings are only relevant to the call handler they are supplied to,
|
||||
/// that is to say, they aren't sticky across multiple calls. Some of these
|
||||
/// settings, such as the compression options, can be made persistant at server
|
||||
/// construction time by specifying the approriate \a ChannelArguments
|
||||
/// settings, such as the compression options, can be made persistent at server
|
||||
/// construction time by specifying the appropriate \a ChannelArguments
|
||||
/// to a \a grpc::ServerBuilder, via \a ServerBuilder::AddChannelArgument.
|
||||
///
|
||||
/// \warning ServerContext instances should \em not be reused across rpcs.
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#define GRPCPP_IMPL_CODEGEN_SERVER_INTERFACE_H
|
||||
|
||||
#include <grpc/impl/codegen/grpc_types.h>
|
||||
#include <grpcpp/impl/codegen/byte_buffer.h>
|
||||
#include <grpcpp/impl/codegen/call_hook.h>
|
||||
#include <grpcpp/impl/codegen/completion_queue_tag.h>
|
||||
#include <grpcpp/impl/codegen/core_codegen_interface.h>
|
||||
|
|
@ -185,14 +186,18 @@ class ServerInterface : public internal::CallHook {
|
|||
notification_cq_(notification_cq),
|
||||
tag_(tag),
|
||||
request_(request) {
|
||||
IssueRequest(registered_method, &payload_, notification_cq);
|
||||
IssueRequest(registered_method, payload_.bbuf_ptr(), notification_cq);
|
||||
}
|
||||
|
||||
~PayloadAsyncRequest() {
|
||||
payload_.Release(); // We do not own the payload_
|
||||
}
|
||||
|
||||
bool FinalizeResult(void** tag, bool* status) override {
|
||||
if (*status) {
|
||||
if (payload_ == nullptr ||
|
||||
!SerializationTraits<Message>::Deserialize(payload_, request_)
|
||||
.ok()) {
|
||||
if (!payload_.Valid() || !SerializationTraits<Message>::Deserialize(
|
||||
payload_.bbuf_ptr(), request_)
|
||||
.ok()) {
|
||||
// If deserialization fails, we cancel the call and instantiate
|
||||
// a new instance of ourselves to request another call. We then
|
||||
// return false, which prevents the call from being returned to
|
||||
|
|
@ -219,7 +224,7 @@ class ServerInterface : public internal::CallHook {
|
|||
ServerCompletionQueue* const notification_cq_;
|
||||
void* const tag_;
|
||||
Message* const request_;
|
||||
grpc_byte_buffer* payload_;
|
||||
ByteBuffer payload_;
|
||||
};
|
||||
|
||||
class GenericAsyncRequest : public BaseAsyncRequest {
|
||||
|
|
|
|||
|
|
@ -35,34 +35,43 @@ namespace grpc {
|
|||
class Slice final {
|
||||
public:
|
||||
/// Construct an empty slice.
|
||||
Slice();
|
||||
Slice() : slice_(g_core_codegen_interface->grpc_empty_slice()) {}
|
||||
/// Destructor - drops one reference.
|
||||
~Slice();
|
||||
~Slice() { g_core_codegen_interface->grpc_slice_unref(slice_); }
|
||||
|
||||
enum AddRef { ADD_REF };
|
||||
/// Construct a slice from \a slice, adding a reference.
|
||||
Slice(grpc_slice slice, AddRef);
|
||||
Slice(grpc_slice slice, AddRef)
|
||||
: slice_(g_core_codegen_interface->grpc_slice_ref(slice)) {}
|
||||
|
||||
enum StealRef { STEAL_REF };
|
||||
/// Construct a slice from \a slice, stealing a reference.
|
||||
Slice(grpc_slice slice, StealRef);
|
||||
Slice(grpc_slice slice, StealRef) : slice_(slice) {}
|
||||
|
||||
/// Allocate a slice of specified size
|
||||
Slice(size_t len);
|
||||
Slice(size_t len)
|
||||
: slice_(g_core_codegen_interface->grpc_slice_malloc(len)) {}
|
||||
|
||||
/// Construct a slice from a copied buffer
|
||||
Slice(const void* buf, size_t len);
|
||||
Slice(const void* buf, size_t len)
|
||||
: slice_(g_core_codegen_interface->grpc_slice_from_copied_buffer(
|
||||
reinterpret_cast<const char*>(buf), len)) {}
|
||||
|
||||
/// Construct a slice from a copied string
|
||||
Slice(const grpc::string& str);
|
||||
Slice(const grpc::string& str)
|
||||
: slice_(g_core_codegen_interface->grpc_slice_from_copied_buffer(
|
||||
str.c_str(), str.length())) {}
|
||||
|
||||
enum StaticSlice { STATIC_SLICE };
|
||||
|
||||
/// Construct a slice from a static buffer
|
||||
Slice(const void* buf, size_t len, StaticSlice);
|
||||
Slice(const void* buf, size_t len, StaticSlice)
|
||||
: slice_(g_core_codegen_interface->grpc_slice_from_static_buffer(
|
||||
reinterpret_cast<const char*>(buf), len)) {}
|
||||
|
||||
/// Copy constructor, adds a reference.
|
||||
Slice(const Slice& other);
|
||||
Slice(const Slice& other)
|
||||
: slice_(g_core_codegen_interface->grpc_slice_ref(other.slice_)) {}
|
||||
|
||||
/// Assignment, reference count is unchanged.
|
||||
Slice& operator=(Slice other) {
|
||||
|
|
@ -75,14 +84,18 @@ class Slice final {
|
|||
/// user data pointer passed in at destruction. Can be the same as buf or
|
||||
/// different (e.g., if data is part of a larger structure that must be
|
||||
/// destroyed when the data is no longer needed)
|
||||
Slice(void* buf, size_t len, void (*destroy)(void*), void* user_data);
|
||||
Slice(void* buf, size_t len, void (*destroy)(void*), void* user_data)
|
||||
: slice_(g_core_codegen_interface->grpc_slice_new_with_user_data(
|
||||
buf, len, destroy, user_data)) {}
|
||||
|
||||
/// Specialization of above for common case where buf == user_data
|
||||
Slice(void* buf, size_t len, void (*destroy)(void*))
|
||||
: Slice(buf, len, destroy, buf) {}
|
||||
|
||||
/// Similar to the above but has a destroy that also takes slice length
|
||||
Slice(void* buf, size_t len, void (*destroy)(void*, size_t));
|
||||
Slice(void* buf, size_t len, void (*destroy)(void*, size_t))
|
||||
: slice_(g_core_codegen_interface->grpc_slice_new_with_len(buf, len,
|
||||
destroy)) {}
|
||||
|
||||
/// Byte size.
|
||||
size_t size() const { return GRPC_SLICE_LENGTH(slice_); }
|
||||
|
|
@ -94,7 +107,9 @@ class Slice final {
|
|||
const uint8_t* end() const { return GRPC_SLICE_END_PTR(slice_); }
|
||||
|
||||
/// Raw C slice. Caller needs to call grpc_slice_unref when done.
|
||||
grpc_slice c_slice() const;
|
||||
grpc_slice c_slice() const {
|
||||
return g_core_codegen_interface->grpc_slice_ref(slice_);
|
||||
}
|
||||
|
||||
private:
|
||||
friend class ByteBuffer;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#ifndef GRPCPP_IMPL_CODEGEN_STATUS_H
|
||||
#define GRPCPP_IMPL_CODEGEN_STATUS_H
|
||||
|
||||
#include <grpc/impl/codegen/status.h>
|
||||
#include <grpcpp/impl/codegen/config.h>
|
||||
#include <grpcpp/impl/codegen/status_code_enum.h>
|
||||
|
||||
|
|
@ -30,7 +31,60 @@ namespace grpc {
|
|||
class Status {
|
||||
public:
|
||||
/// Construct an OK instance.
|
||||
Status() : code_(StatusCode::OK) {}
|
||||
Status() : code_(StatusCode::OK) {
|
||||
// Static assertions to make sure that the C++ API value correctly
|
||||
// maps to the core surface API value
|
||||
static_assert(StatusCode::OK == static_cast<StatusCode>(GRPC_STATUS_OK),
|
||||
"Mismatched status code");
|
||||
static_assert(
|
||||
StatusCode::CANCELLED == static_cast<StatusCode>(GRPC_STATUS_CANCELLED),
|
||||
"Mismatched status code");
|
||||
static_assert(
|
||||
StatusCode::UNKNOWN == static_cast<StatusCode>(GRPC_STATUS_UNKNOWN),
|
||||
"Mismatched status code");
|
||||
static_assert(StatusCode::INVALID_ARGUMENT ==
|
||||
static_cast<StatusCode>(GRPC_STATUS_INVALID_ARGUMENT),
|
||||
"Mismatched status code");
|
||||
static_assert(StatusCode::DEADLINE_EXCEEDED ==
|
||||
static_cast<StatusCode>(GRPC_STATUS_DEADLINE_EXCEEDED),
|
||||
"Mismatched status code");
|
||||
static_assert(
|
||||
StatusCode::NOT_FOUND == static_cast<StatusCode>(GRPC_STATUS_NOT_FOUND),
|
||||
"Mismatched status code");
|
||||
static_assert(StatusCode::ALREADY_EXISTS ==
|
||||
static_cast<StatusCode>(GRPC_STATUS_ALREADY_EXISTS),
|
||||
"Mismatched status code");
|
||||
static_assert(StatusCode::PERMISSION_DENIED ==
|
||||
static_cast<StatusCode>(GRPC_STATUS_PERMISSION_DENIED),
|
||||
"Mismatched status code");
|
||||
static_assert(StatusCode::UNAUTHENTICATED ==
|
||||
static_cast<StatusCode>(GRPC_STATUS_UNAUTHENTICATED),
|
||||
"Mismatched status code");
|
||||
static_assert(StatusCode::RESOURCE_EXHAUSTED ==
|
||||
static_cast<StatusCode>(GRPC_STATUS_RESOURCE_EXHAUSTED),
|
||||
"Mismatched status code");
|
||||
static_assert(StatusCode::FAILED_PRECONDITION ==
|
||||
static_cast<StatusCode>(GRPC_STATUS_FAILED_PRECONDITION),
|
||||
"Mismatched status code");
|
||||
static_assert(
|
||||
StatusCode::ABORTED == static_cast<StatusCode>(GRPC_STATUS_ABORTED),
|
||||
"Mismatched status code");
|
||||
static_assert(StatusCode::OUT_OF_RANGE ==
|
||||
static_cast<StatusCode>(GRPC_STATUS_OUT_OF_RANGE),
|
||||
"Mismatched status code");
|
||||
static_assert(StatusCode::UNIMPLEMENTED ==
|
||||
static_cast<StatusCode>(GRPC_STATUS_UNIMPLEMENTED),
|
||||
"Mismatched status code");
|
||||
static_assert(
|
||||
StatusCode::INTERNAL == static_cast<StatusCode>(GRPC_STATUS_INTERNAL),
|
||||
"Mismatched status code");
|
||||
static_assert(StatusCode::UNAVAILABLE ==
|
||||
static_cast<StatusCode>(GRPC_STATUS_UNAVAILABLE),
|
||||
"Mismatched status code");
|
||||
static_assert(
|
||||
StatusCode::DATA_LOSS == static_cast<StatusCode>(GRPC_STATUS_DATA_LOSS),
|
||||
"Mismatched status code");
|
||||
}
|
||||
|
||||
/// Construct an instance with associated \a code and \a error_message.
|
||||
/// It is an error to construct an OK status with non-empty \a error_message.
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <grpcpp/impl/codegen/grpc_library.h>
|
||||
#include <grpcpp/security/auth_context.h>
|
||||
|
|
@ -219,6 +220,21 @@ class MetadataCredentialsPlugin {
|
|||
std::shared_ptr<CallCredentials> MetadataCredentialsFromPlugin(
|
||||
std::unique_ptr<MetadataCredentialsPlugin> plugin);
|
||||
|
||||
namespace experimental {
|
||||
|
||||
/// Options used to build AltsCredentials.
|
||||
struct AltsCredentialsOptions {
|
||||
/// service accounts of target endpoint that will be acceptable
|
||||
/// by the client. If service accounts are provided and none of them matches
|
||||
/// that of the server, authentication will fail.
|
||||
std::vector<grpc::string> target_service_accounts;
|
||||
};
|
||||
|
||||
/// Builds ALTS Credentials given ALTS specific options
|
||||
std::shared_ptr<ChannelCredentials> AltsCredentials(
|
||||
const AltsCredentialsOptions& options);
|
||||
|
||||
} // namespace experimental
|
||||
} // namespace grpc
|
||||
|
||||
#endif // GRPCPP_SECURITY_CREDENTIALS_H
|
||||
|
|
|
|||
|
|
@ -86,6 +86,18 @@ std::shared_ptr<ServerCredentials> SslServerCredentials(
|
|||
/// Builds insecure server credentials.
|
||||
std::shared_ptr<ServerCredentials> InsecureServerCredentials();
|
||||
|
||||
namespace experimental {
|
||||
|
||||
/// Options to create ServerCredentials with ALTS
|
||||
struct AltsServerCredentialsOptions {
|
||||
/// Add fields if needed.
|
||||
};
|
||||
|
||||
/// Builds ALTS ServerCredentials given ALTS specific options
|
||||
std::shared_ptr<ServerCredentials> AltsServerCredentials(
|
||||
const AltsServerCredentialsOptions& options);
|
||||
|
||||
} // namespace experimental
|
||||
} // namespace grpc
|
||||
|
||||
#endif // GRPCPP_SECURITY_SERVER_CREDENTIALS_H
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class ServerInitializer;
|
|||
///
|
||||
/// Use a \a grpc::ServerBuilder to create, configure, and start
|
||||
/// \a Server instances.
|
||||
class Server final : public ServerInterface, private GrpcLibraryCodegen {
|
||||
class Server : public ServerInterface, private GrpcLibraryCodegen {
|
||||
public:
|
||||
~Server();
|
||||
|
||||
|
|
@ -87,7 +87,8 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen {
|
|||
/// application and is shared among all \a Server objects.
|
||||
static void SetGlobalCallbacks(GlobalCallbacks* callbacks);
|
||||
|
||||
// Returns a \em raw pointer to the underlying \a grpc_server instance.
|
||||
/// Returns a \em raw pointer to the underlying \a grpc_server instance.
|
||||
/// EXPERIMENTAL: for internal/test use only
|
||||
grpc_server* c_server();
|
||||
|
||||
/// Returns the health check service.
|
||||
|
|
@ -98,24 +99,26 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen {
|
|||
/// Establish a channel for in-process communication
|
||||
std::shared_ptr<Channel> InProcessChannel(const ChannelArguments& args);
|
||||
|
||||
private:
|
||||
friend class AsyncGenericService;
|
||||
friend class ServerBuilder;
|
||||
friend class ServerInitializer;
|
||||
protected:
|
||||
/// Register a service. This call does not take ownership of the service.
|
||||
/// The service must exist for the lifetime of the Server instance.
|
||||
bool RegisterService(const grpc::string* host, Service* service) override;
|
||||
|
||||
class SyncRequest;
|
||||
class AsyncRequest;
|
||||
class ShutdownRequest;
|
||||
|
||||
/// SyncRequestThreadManager is an implementation of ThreadManager. This class
|
||||
/// is responsible for polling for incoming RPCs and calling the RPC handlers.
|
||||
/// This is only used in case of a Sync server (i.e a server exposing a sync
|
||||
/// interface)
|
||||
class SyncRequestThreadManager;
|
||||
|
||||
class UnimplementedAsyncRequestContext;
|
||||
class UnimplementedAsyncRequest;
|
||||
class UnimplementedAsyncResponse;
|
||||
/// Try binding the server to the given \a addr endpoint
|
||||
/// (port, and optionally including IP address to bind to).
|
||||
///
|
||||
/// It can be invoked multiple times. Should be used before
|
||||
/// starting the server.
|
||||
///
|
||||
/// \param addr The address to try to bind to the server (eg, localhost:1234,
|
||||
/// 192.168.1.1:31416, [::1]:27182, etc.).
|
||||
/// \param creds The credentials associated with the server.
|
||||
///
|
||||
/// \return bound port number on success, 0 on failure.
|
||||
///
|
||||
/// \warning It is an error to call this method on an already started server.
|
||||
int AddListeningPort(const grpc::string& addr,
|
||||
ServerCredentials* creds) override;
|
||||
|
||||
/// Server constructors. To be used by \a ServerBuilder only.
|
||||
///
|
||||
|
|
@ -143,30 +146,6 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen {
|
|||
sync_server_cqs,
|
||||
int min_pollers, int max_pollers, int sync_cq_timeout_msec);
|
||||
|
||||
/// Register a service. This call does not take ownership of the service.
|
||||
/// The service must exist for the lifetime of the Server instance.
|
||||
bool RegisterService(const grpc::string* host, Service* service) override;
|
||||
|
||||
/// Register a generic service. This call does not take ownership of the
|
||||
/// service. The service must exist for the lifetime of the Server instance.
|
||||
void RegisterAsyncGenericService(AsyncGenericService* service) override;
|
||||
|
||||
/// Try binding the server to the given \a addr endpoint
|
||||
/// (port, and optionally including IP address to bind to).
|
||||
///
|
||||
/// It can be invoked multiple times. Should be used before
|
||||
/// starting the server.
|
||||
///
|
||||
/// \param addr The address to try to bind to the server (eg, localhost:1234,
|
||||
/// 192.168.1.1:31416, [::1]:27182, etc.).
|
||||
/// \param creds The credentials associated with the server.
|
||||
///
|
||||
/// \return bound port number on success, 0 on failure.
|
||||
///
|
||||
/// \warning It is an error to call this method on an already started server.
|
||||
int AddListeningPort(const grpc::string& addr,
|
||||
ServerCredentials* creds) override;
|
||||
|
||||
/// Start the server.
|
||||
///
|
||||
/// \param cqs Completion queues for handling asynchronous services. The
|
||||
|
|
@ -175,6 +154,27 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen {
|
|||
/// \param num_cqs How many completion queues does \a cqs hold.
|
||||
void Start(ServerCompletionQueue** cqs, size_t num_cqs) override;
|
||||
|
||||
grpc_server* server() override { return server_; };
|
||||
|
||||
private:
|
||||
friend class AsyncGenericService;
|
||||
friend class ServerBuilder;
|
||||
friend class ServerInitializer;
|
||||
|
||||
class SyncRequest;
|
||||
class UnimplementedAsyncRequest;
|
||||
class UnimplementedAsyncResponse;
|
||||
|
||||
/// SyncRequestThreadManager is an implementation of ThreadManager. This class
|
||||
/// is responsible for polling for incoming RPCs and calling the RPC handlers.
|
||||
/// This is only used in case of a Sync server (i.e a server exposing a sync
|
||||
/// interface)
|
||||
class SyncRequestThreadManager;
|
||||
|
||||
/// Register a generic service. This call does not take ownership of the
|
||||
/// service. The service must exist for the lifetime of the Server instance.
|
||||
void RegisterAsyncGenericService(AsyncGenericService* service) override;
|
||||
|
||||
void PerformOpsOnCall(internal::CallOpSetInterface* ops,
|
||||
internal::Call* call) override;
|
||||
|
||||
|
|
@ -184,8 +184,6 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen {
|
|||
return max_receive_message_size_;
|
||||
};
|
||||
|
||||
grpc_server* server() override { return server_; };
|
||||
|
||||
ServerInitializer* initializer();
|
||||
|
||||
const int max_receive_message_size_;
|
||||
|
|
@ -200,7 +198,7 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen {
|
|||
/// the \a sync_server_cqs)
|
||||
std::vector<std::unique_ptr<SyncRequestThreadManager>> sync_req_mgrs_;
|
||||
|
||||
// Sever status
|
||||
// Server status
|
||||
std::mutex mu_;
|
||||
bool started_;
|
||||
bool shutdown_;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class ServerBuilderPluginTest;
|
|||
class ServerBuilder {
|
||||
public:
|
||||
ServerBuilder();
|
||||
~ServerBuilder();
|
||||
virtual ~ServerBuilder();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Primary API's
|
||||
|
|
@ -65,7 +65,7 @@ class ServerBuilder {
|
|||
/// traffic (via AddListeningPort)
|
||||
/// 3. [for async api only] completion queues have been added via
|
||||
/// AddCompletionQueue
|
||||
std::unique_ptr<Server> BuildAndStart();
|
||||
virtual std::unique_ptr<Server> BuildAndStart();
|
||||
|
||||
/// Register a service. This call does not take ownership of the service.
|
||||
/// The service must exist for the lifetime of the \a Server instance returned
|
||||
|
|
@ -210,15 +210,48 @@ class ServerBuilder {
|
|||
/// doc/workarounds.md.
|
||||
ServerBuilder& EnableWorkaround(grpc_workaround_list id);
|
||||
|
||||
private:
|
||||
friend class ::grpc::testing::ServerBuilderPluginTest;
|
||||
|
||||
protected:
|
||||
/// Experimental, to be deprecated
|
||||
struct Port {
|
||||
grpc::string addr;
|
||||
std::shared_ptr<ServerCredentials> creds;
|
||||
int* selected_port;
|
||||
};
|
||||
|
||||
/// Experimental, to be deprecated
|
||||
typedef std::unique_ptr<grpc::string> HostString;
|
||||
struct NamedService {
|
||||
explicit NamedService(Service* s) : service(s) {}
|
||||
NamedService(const grpc::string& h, Service* s)
|
||||
: host(new grpc::string(h)), service(s) {}
|
||||
HostString host;
|
||||
Service* service;
|
||||
};
|
||||
|
||||
/// Experimental, to be deprecated
|
||||
std::vector<Port> ports() { return ports_; }
|
||||
|
||||
/// Experimental, to be deprecated
|
||||
std::vector<NamedService*> services() {
|
||||
std::vector<NamedService*> service_refs;
|
||||
for (auto& ptr : services_) {
|
||||
service_refs.push_back(ptr.get());
|
||||
}
|
||||
return service_refs;
|
||||
}
|
||||
|
||||
/// Experimental, to be deprecated
|
||||
std::vector<ServerBuilderOption*> options() {
|
||||
std::vector<ServerBuilderOption*> option_refs;
|
||||
for (auto& ptr : options_) {
|
||||
option_refs.push_back(ptr.get());
|
||||
}
|
||||
return option_refs;
|
||||
}
|
||||
|
||||
private:
|
||||
friend class ::grpc::testing::ServerBuilderPluginTest;
|
||||
|
||||
struct SyncServerSettings {
|
||||
SyncServerSettings()
|
||||
: num_cqs(1), min_pollers(1), max_pollers(2), cq_timeout_msec(10000) {}
|
||||
|
|
@ -238,15 +271,6 @@ class ServerBuilder {
|
|||
int cq_timeout_msec;
|
||||
};
|
||||
|
||||
typedef std::unique_ptr<grpc::string> HostString;
|
||||
struct NamedService {
|
||||
explicit NamedService(Service* s) : service(s) {}
|
||||
NamedService(const grpc::string& h, Service* s)
|
||||
: host(new grpc::string(h)), service(s) {}
|
||||
HostString host;
|
||||
Service* service;
|
||||
};
|
||||
|
||||
int max_receive_message_size_;
|
||||
int max_send_message_size_;
|
||||
std::vector<std::unique_ptr<ServerBuilderOption>> options_;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,13 @@ class ChannelArguments {
|
|||
/// the resolver.
|
||||
void SetGrpclbFallbackTimeout(int fallback_timeout);
|
||||
|
||||
/// Set the socket mutator for the channel.
|
||||
/// For client channel's, the socket mutator operates on
|
||||
/// "channel" sockets. For server's, the socket mutator operates
|
||||
/// only on "listen" sockets.
|
||||
/// TODO(apolcyn): allow socket mutators to also operate
|
||||
/// on server "channel" sockets, and adjust the socket mutator
|
||||
/// object to be more speficic about which type of socket
|
||||
/// it should operate on.
|
||||
void SetSocketMutator(grpc_socket_mutator* mutator);
|
||||
|
||||
/// Set the string to prepend to the user agent.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2018 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef GRPCPP_SUPPORT_PROTO_BUFFER_READER_H
|
||||
#define GRPCPP_SUPPORT_PROTO_BUFFER_READER_H
|
||||
|
||||
#include <grpcpp/impl/codegen/proto_buffer_reader.h>
|
||||
|
||||
#endif // GRPCPP_SUPPORT_PROTO_BUFFER_READER_H
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2018 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef GRPCPP_SUPPORT_PROTO_BUFFER_WRITER_H
|
||||
#define GRPCPP_SUPPORT_PROTO_BUFFER_WRITER_H
|
||||
|
||||
#include <grpcpp/impl/codegen/proto_buffer_writer.h>
|
||||
|
||||
#endif // GRPCPP_SUPPORT_PROTO_BUFFER_WRITER_H
|
||||
65
package.xml
65
package.xml
|
|
@ -13,8 +13,8 @@
|
|||
<date>2018-01-19</date>
|
||||
<time>16:06:07</time>
|
||||
<version>
|
||||
<release>1.11.0dev</release>
|
||||
<api>1.11.0dev</api>
|
||||
<release>1.13.0dev</release>
|
||||
<api>1.13.0dev</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>beta</release>
|
||||
|
|
@ -51,6 +51,11 @@
|
|||
<file baseinstalldir="/" name="src/php/ext/grpc/server_credentials.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/php/ext/grpc/timeval.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/php/ext/grpc/version.h" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/address_sorting/address_sorting_internal.h" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/address_sorting/include/address_sorting/address_sorting.h" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/address_sorting/address_sorting.c" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/address_sorting/address_sorting_posix.c" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/address_sorting/address_sorting_windows.c" role="src" />
|
||||
<file baseinstalldir="/" name="include/grpc/support/alloc.h" role="src" />
|
||||
<file baseinstalldir="/" name="include/grpc/support/atm.h" role="src" />
|
||||
<file baseinstalldir="/" name="include/grpc/support/atm_gcc_atomic.h" role="src" />
|
||||
|
|
@ -203,6 +208,7 @@
|
|||
<file baseinstalldir="/" name="src/core/ext/filters/http/client/http_client_filter.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/http/message_compress/message_compress_filter.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/http/server/http_server_filter.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/security/context/security_context.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/security/credentials/alts/alts_credentials.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/security/credentials/composite/composite_credentials.h" role="src" />
|
||||
|
|
@ -254,8 +260,8 @@
|
|||
<file baseinstalldir="/" name="third_party/nanopb/pb_decode.h" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/nanopb/pb_encode.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/tsi/transport_security.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/tsi/transport_security_adapter.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/tsi/transport_security_interface.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/authority.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/chttp2_connector.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/backup_poller.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/client_channel.h" role="src" />
|
||||
|
|
@ -274,13 +280,14 @@
|
|||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver_factory.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver_registry.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/retry_throttle.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/status_util.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/subchannel.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/subchannel_index.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/uri_parser.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/deadline/deadline_filter.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/tsi/alts_transport_security.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/tsi/fake_transport_security.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/tsi/ssl/session_cache/ssl_session.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/tsi/ssl/session_cache/ssl_session_cache.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/tsi/ssl_transport_security.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/tsi/ssl_types.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/tsi/transport_security_grpc.h" role="src" />
|
||||
|
|
@ -291,11 +298,14 @@
|
|||
<file baseinstalldir="/" name="src/core/lib/channel/channel_args.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/channel/channel_stack.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/channel/channel_stack_builder.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/channel/channel_trace.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/channel/channel_trace_registry.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/channel/connected_channel.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/channel/context.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/channel/handshaker.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/channel/handshaker_factory.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/channel/handshaker_registry.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/channel/status_util.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/compression/algorithm_metadata.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/compression/compression_internal.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/compression/message_compress.h" role="src" />
|
||||
|
|
@ -330,9 +340,9 @@
|
|||
<file baseinstalldir="/" name="src/core/lib/iomgr/gethostname.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/iocp_windows.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_custom.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_internal.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_posix.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_uv.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/is_epollexclusive_available.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/load_file.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/lockfree_event.h" role="src" />
|
||||
|
|
@ -340,14 +350,17 @@
|
|||
<file baseinstalldir="/" name="src/core/lib/iomgr/network_status_tracker.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/polling_entity.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_custom.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_custom.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_windows.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_uv.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_windows.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/port.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address_custom.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/resource_quota.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_custom.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_posix.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_utils.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_windows.h" role="src" />
|
||||
|
|
@ -359,17 +372,16 @@
|
|||
<file baseinstalldir="/" name="src/core/lib/iomgr/sys_epoll_wrapper.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client_posix.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_custom.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_posix.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_utils_posix.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_uv.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_windows.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/time_averaged_stats.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/timer.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/timer_generic.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/timer_custom.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/timer_heap.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/timer_manager.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/timer_uv.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/udp_server.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/unix_sockets_posix.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/wakeup_fd_cv.h" role="src" />
|
||||
|
|
@ -427,6 +439,7 @@
|
|||
<file baseinstalldir="/" name="src/core/ext/filters/load_reporting/server_load_reporting_plugin.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/max_age/max_age_filter.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/message_size/message_size_filter.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/http/client_authority_filter.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/workarounds/workaround_utils.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/surface/init.cc" role="src" />
|
||||
|
|
@ -435,10 +448,13 @@
|
|||
<file baseinstalldir="/" name="src/core/lib/channel/channel_args.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/channel/channel_stack.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/channel/channel_stack_builder.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/channel/channel_trace.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/channel/channel_trace_registry.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/channel/connected_channel.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/channel/handshaker.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/channel/handshaker_factory.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/channel/handshaker_registry.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/channel/status_util.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/compression/compression.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/compression/compression_internal.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/compression/message_compress.cc" role="src" />
|
||||
|
|
@ -472,6 +488,8 @@
|
|||
<file baseinstalldir="/" name="src/core/lib/iomgr/gethostname_sysconf.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/iocp_windows.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_custom.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_internal.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_posix.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_uv.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_windows.cc" role="src" />
|
||||
|
|
@ -480,12 +498,16 @@
|
|||
<file baseinstalldir="/" name="src/core/lib/iomgr/lockfree_event.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/network_status_tracker.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/polling_entity.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_uv.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_custom.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_custom.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_windows.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_uv.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_windows.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address_custom.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address_posix.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address_uv.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address_windows.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/resource_quota.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_utils.cc" role="src" />
|
||||
|
|
@ -497,19 +519,24 @@
|
|||
<file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_uv.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_windows.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/socket_windows.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client_custom.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client_posix.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client_uv.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client_windows.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_custom.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_posix.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_custom.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_posix.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_utils_posix_common.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_uv.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_windows.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_uv.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_windows.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/time_averaged_stats.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/timer.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/timer_custom.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/timer_generic.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/timer_heap.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/lib/iomgr/timer_manager.cc" role="src" />
|
||||
|
|
@ -654,9 +681,9 @@
|
|||
<file baseinstalldir="/" name="third_party/nanopb/pb_decode.c" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/nanopb/pb_encode.c" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/tsi/transport_security.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/tsi/transport_security_adapter.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/insecure/channel_create.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/authority.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/chttp2_connector.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/backup_poller.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/channel_connectivity.cc" role="src" />
|
||||
|
|
@ -676,13 +703,15 @@
|
|||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver_registry.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/retry_throttle.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/status_util.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/subchannel.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/subchannel_index.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/uri_parser.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/deadline/deadline_filter.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/tsi/alts_transport_security.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/tsi/fake_transport_security.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/tsi/ssl/session_cache/ssl_session_cache.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/tsi/ssl/session_cache/ssl_session_openssl.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/tsi/ssl_transport_security.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/tsi/transport_security_grpc.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/server/chttp2_server.cc" role="src" />
|
||||
|
|
@ -699,7 +728,6 @@
|
|||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc" role="src" />
|
||||
|
|
@ -712,6 +740,7 @@
|
|||
<file baseinstalldir="/" name="src/core/ext/census/grpc_context.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/max_age/max_age_filter.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/message_size/message_size_filter.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/http/client_authority_filter.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/ext/filters/workarounds/workaround_utils.cc" role="src" />
|
||||
<file baseinstalldir="/" name="src/core/plugin_registry/grpc_plugin_registry.cc" role="src" />
|
||||
|
|
@ -721,7 +750,6 @@
|
|||
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher_extra/internal.h" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/crypto/conf/conf_def.h" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/crypto/conf/internal.h" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/crypto/curve25519/internal.h" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/crypto/err/internal.h" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/internal.h" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/crypto/fipsmodule/aes/aes.c" role="src" />
|
||||
|
|
@ -883,6 +911,7 @@
|
|||
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/x509_vfy.h" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/x509v3.h" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/ssl/internal.h" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/third_party/fiat/internal.h" role="src" />
|
||||
<file baseinstalldir="/" name="src/boringssl/err_data.c" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_bitstr.c" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_bool.c" role="src" />
|
||||
|
|
@ -952,7 +981,6 @@
|
|||
<file baseinstalldir="/" name="third_party/boringssl/crypto/cpu-intel.c" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/crypto/cpu-ppc64le.c" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/crypto/crypto.c" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/crypto/curve25519/curve25519.c" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/crypto/curve25519/spake25519.c" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/crypto/curve25519/x25519-x86_64.c" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/crypto/dh/check.c" role="src" />
|
||||
|
|
@ -1138,6 +1166,7 @@
|
|||
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls13_server.cc" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls_method.cc" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls_record.cc" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/boringssl/third_party/fiat/curve25519.c" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/zlib/crc32.h" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/zlib/deflate.h" role="src" />
|
||||
<file baseinstalldir="/" name="third_party/zlib/gzguts.h" role="src" />
|
||||
|
|
|
|||
16
setup.py
16
setup.py
|
|
@ -48,6 +48,7 @@ if 'linux' in sys.platform:
|
|||
CARES_INCLUDE += (os.path.join('third_party', 'cares', 'config_linux'),)
|
||||
if 'openbsd' in sys.platform:
|
||||
CARES_INCLUDE += (os.path.join('third_party', 'cares', 'config_openbsd'),)
|
||||
ADDRESS_SORTING_INCLUDE = (os.path.join('third_party', 'address_sorting', 'include'),)
|
||||
README = os.path.join(PYTHON_STEM, 'README.rst')
|
||||
|
||||
# Ensure we're in the proper directory whether or not we're being used by pip.
|
||||
|
|
@ -103,9 +104,9 @@ ENABLE_DOCUMENTATION_BUILD = os.environ.get(
|
|||
EXTRA_ENV_COMPILE_ARGS = os.environ.get('GRPC_PYTHON_CFLAGS', None)
|
||||
EXTRA_ENV_LINK_ARGS = os.environ.get('GRPC_PYTHON_LDFLAGS', None)
|
||||
if EXTRA_ENV_COMPILE_ARGS is None:
|
||||
EXTRA_ENV_COMPILE_ARGS = ''
|
||||
EXTRA_ENV_COMPILE_ARGS = ' -std=c++11'
|
||||
if 'win32' in sys.platform and sys.version_info < (3, 5):
|
||||
EXTRA_ENV_COMPILE_ARGS += ' -std=c++11'
|
||||
EXTRA_ENV_COMPILE_ARGS += ' -D_hypot=hypot'
|
||||
# We use define flags here and don't directly add to DEFINE_MACROS below to
|
||||
# ensure that the expert user/builder has a way of turning it off (via the
|
||||
# envvars) without adding yet more GRPC-specific envvars.
|
||||
|
|
@ -115,10 +116,10 @@ if EXTRA_ENV_COMPILE_ARGS is None:
|
|||
else:
|
||||
EXTRA_ENV_COMPILE_ARGS += ' -D_ftime=_ftime64 -D_timeb=__timeb64'
|
||||
elif "linux" in sys.platform:
|
||||
EXTRA_ENV_COMPILE_ARGS += ' -std=c++11 -std=gnu99 -fvisibility=hidden -fno-wrapv -fno-exceptions'
|
||||
EXTRA_ENV_COMPILE_ARGS += ' -std=gnu99 -fvisibility=hidden -fno-wrapv -fno-exceptions'
|
||||
elif "darwin" in sys.platform:
|
||||
EXTRA_ENV_COMPILE_ARGS += ' -fvisibility=hidden -fno-wrapv -fno-exceptions'
|
||||
EXTRA_ENV_COMPILE_ARGS += ' -DPB_FIELD_16BIT'
|
||||
EXTRA_ENV_COMPILE_ARGS += ' -DPB_FIELD_16BIT'
|
||||
|
||||
if EXTRA_ENV_LINK_ARGS is None:
|
||||
EXTRA_ENV_LINK_ARGS = ''
|
||||
|
|
@ -149,7 +150,7 @@ if "win32" in sys.platform:
|
|||
|
||||
EXTENSION_INCLUDE_DIRECTORIES = (
|
||||
(PYTHON_STEM,) + CORE_INCLUDE + BORINGSSL_INCLUDE + ZLIB_INCLUDE +
|
||||
CARES_INCLUDE)
|
||||
CARES_INCLUDE + ADDRESS_SORTING_INCLUDE)
|
||||
|
||||
EXTENSION_LIBRARIES = ()
|
||||
if "linux" in sys.platform:
|
||||
|
|
@ -181,7 +182,7 @@ LDFLAGS = tuple(EXTRA_LINK_ARGS)
|
|||
CFLAGS = tuple(EXTRA_COMPILE_ARGS)
|
||||
if "linux" in sys.platform or "darwin" in sys.platform:
|
||||
pymodinit_type = 'PyObject*' if PY3 else 'void'
|
||||
pymodinit = '__attribute__((visibility ("default"))) {}'.format(pymodinit_type)
|
||||
pymodinit = 'extern "C" __attribute__((visibility ("default"))) {}'.format(pymodinit_type)
|
||||
DEFINE_MACROS += (('PyMODINIT_FUNC', pymodinit),)
|
||||
DEFINE_MACROS += (('GRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK', 1),)
|
||||
|
||||
|
|
@ -238,9 +239,6 @@ PACKAGE_DIRECTORIES = {
|
|||
|
||||
INSTALL_REQUIRES = (
|
||||
'six>=1.5.2',
|
||||
# TODO(atash): eventually split the grpcio package into a metapackage
|
||||
# depending on protobuf and the runtime component (independent of protobuf)
|
||||
'protobuf>=3.5.0.post1',
|
||||
)
|
||||
|
||||
if not PY3:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/workspace.xml
|
||||
/.idea/libraries
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
gRPC on Android
|
||||
==============
|
||||
|
||||
Note: Building the protobuf dependency for Android requires
|
||||
https://github.com/google/protobuf/pull/3878. This fix will be in the next
|
||||
protobuf release, but until then must be manually patched in to
|
||||
`third_party/protobuf` to build gRPC for Android.
|
||||
|
||||
PREREQUISITES
|
||||
-------------
|
||||
|
||||
- Android SDK
|
||||
- Android NDK
|
||||
- `protoc` and `grpc_cpp_plugin` binaries on the host system
|
||||
|
||||
INSTALL
|
||||
-------
|
||||
|
||||
The example application can be built via Android Studio or on the command line
|
||||
using `gradle`:
|
||||
|
||||
```sh
|
||||
$ ./gradlew installDebug
|
||||
```
|
||||
|
||||
INSTRUMENTATION TESTS
|
||||
---------------------
|
||||
|
||||
The instrumentation tests can be run via the following `gradle` command. This
|
||||
requires an emulator already running on your computer.
|
||||
|
||||
```
|
||||
$ ./gradlew connectedAndroidTest \
|
||||
-Pandroid.testInstrumentationRunnerArguments.server_host=grpc-test.sandbox.googleapis.com \
|
||||
-Pandroid.testInstrumentationRunnerArguments.server_port=443 \
|
||||
-Pandroid.testInstrumentationRunnerArguments.use_tls=true
|
||||
```
|
||||
|
|
@ -0,0 +1 @@
|
|||
/build
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
cmake_minimum_required(VERSION 3.4.1)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
|
||||
set(PROTOBUF_PROTOC_EXECUTABLE "/usr/local/bin/protoc" CACHE STRING "Protoc binary on host")
|
||||
set(gRPC_CPP_PLUGIN_EXECUTABLE "/usr/local/bin/grpc_cpp_plugin" CACHE STRING "gRPC CPP plugin binary on host")
|
||||
|
||||
set(GRPC_SRC_DIR ../../../../../)
|
||||
|
||||
set(GRPC_BUILD_DIR ../grpc/outputs/${ANDROID_ABI})
|
||||
file(MAKE_DIRECTORY ${GRPC_BUILD_DIR})
|
||||
|
||||
add_subdirectory(${GRPC_SRC_DIR} ${GRPC_BUILD_DIR})
|
||||
|
||||
#include_directories(${GRPC_SRC_DIR}/include)
|
||||
include_directories(${GRPC_SRC_DIR})
|
||||
|
||||
set(GRPC_PROTO_GENS_DIR ${CMAKE_BINARY_DIR}/gens)
|
||||
file(MAKE_DIRECTORY ${GRPC_PROTO_GENS_DIR})
|
||||
include_directories(${GRPC_PROTO_GENS_DIR})
|
||||
|
||||
function(android_protobuf_grpc_generate_cpp SRC_FILES HDR_FILES INCLUDE_ROOT)
|
||||
if(NOT ARGN)
|
||||
message(SEND_ERROR "Error: android_protobuf_grpc_generate_cpp() called without any proto files")
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(${SRC_FILES})
|
||||
set(${HDR_FILES})
|
||||
set(PROTOBUF_INCLUDE_PATH -I ${INCLUDE_ROOT})
|
||||
foreach(FIL ${ARGN})
|
||||
get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
|
||||
get_filename_component(FIL_WE ${FIL} NAME_WE)
|
||||
file(RELATIVE_PATH REL_FIL ${CMAKE_CURRENT_SOURCE_DIR}/${INCLUDE_ROOT} ${ABS_FIL})
|
||||
get_filename_component(REL_DIR ${REL_FIL} DIRECTORY)
|
||||
set(RELFIL_WE "${REL_DIR}/${FIL_WE}")
|
||||
|
||||
list(APPEND ${SRC_FILES} "${GRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.cc")
|
||||
list(APPEND ${HDR_FILES} "${GRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.h")
|
||||
list(APPEND ${SRC_FILES} "${GRPC_PROTO_GENS_DIR}/${RELFIL_WE}.grpc.pb.cc")
|
||||
list(APPEND ${HDR_FILES} "${GRPC_PROTO_GENS_DIR}/${RELFIL_WE}.grpc.pb.h")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${GRPC_PROTO_GENS_DIR}/${RELFIL_WE}.grpc.pb.cc"
|
||||
"${GRPC_PROTO_GENS_DIR}/${RELFIL_WE}.grpc.pb.h"
|
||||
"${GRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.cc"
|
||||
"${GRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.h"
|
||||
COMMAND ${PROTOBUF_PROTOC_EXECUTABLE}
|
||||
ARGS --grpc_out=${GRPC_PROTO_GENS_DIR}
|
||||
--cpp_out=${GRPC_PROTO_GENS_DIR}
|
||||
--plugin=protoc-gen-grpc=${gRPC_CPP_PLUGIN_EXECUTABLE}
|
||||
${PROTOBUF_INCLUDE_PATH}
|
||||
${REL_FIL}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DEPENDS ${PROTOBUF_PROTOC_EXECUTABLE} ${gRPC_CPP_PLUGIN_EXECUTABLE} ${ABS_FIL} )
|
||||
endforeach()
|
||||
|
||||
set_source_files_properties(${${SRC_FILES}} ${${HDR_FILES}} PROPERTIES GENERATED TRUE)
|
||||
set(${SRC_FILES} ${${SRC_FILES}} PARENT_SCOPE)
|
||||
set(${HDR_FILES} ${${HDR_FILES}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
set(PROTO_BASE_DIR ${GRPC_SRC_DIR}/examples/protos)
|
||||
|
||||
android_protobuf_grpc_generate_cpp(
|
||||
MESSAGES_PROTO_SRCS MESSAGES_PROTO_HDRS
|
||||
${GRPC_SRC_DIR} ${GRPC_SRC_DIR}/src/proto/grpc/testing/messages.proto)
|
||||
|
||||
add_library(messages_proto_lib
|
||||
SHARED ${MESSAGES_PROTO_SRCS} ${MESSAGES_PROTO_HDRS})
|
||||
|
||||
target_link_libraries(messages_proto_lib
|
||||
libprotobuf
|
||||
grpc++
|
||||
android
|
||||
log)
|
||||
|
||||
android_protobuf_grpc_generate_cpp(
|
||||
EMPTY_PROTO_SRCS EMPTY_PROTO_HDRS
|
||||
${GRPC_SRC_DIR} ${GRPC_SRC_DIR}/src/proto/grpc/testing/empty.proto)
|
||||
|
||||
add_library(empty_proto_lib
|
||||
SHARED ${EMPTY_PROTO_SRCS} ${EMPTY_PROTO_HDRS})
|
||||
|
||||
target_link_libraries(empty_proto_lib
|
||||
libprotobuf
|
||||
grpc++
|
||||
android
|
||||
log)
|
||||
|
||||
android_protobuf_grpc_generate_cpp(
|
||||
TEST_PROTO_SRCS TEST_PROTO_HDRS ${GRPC_SRC_DIR} ${GRPC_SRC_DIR}/src/proto/grpc/testing/test.proto)
|
||||
|
||||
add_library(test_proto_lib
|
||||
SHARED ${TEST_PROTO_SRCS} ${TEST_PROTO_HDRS})
|
||||
|
||||
target_link_libraries(test_proto_lib
|
||||
libprotobuf
|
||||
grpc++
|
||||
empty_proto_lib
|
||||
messages_proto_lib
|
||||
android
|
||||
log)
|
||||
|
||||
find_library(log-lib
|
||||
log)
|
||||
|
||||
add_library(grpc-interop
|
||||
SHARED
|
||||
src/main/cpp/grpc-interop.cc
|
||||
${GRPC_SRC_DIR}/test/cpp/interop/interop_client.h
|
||||
${GRPC_SRC_DIR}/test/cpp/interop/interop_client.cc)
|
||||
|
||||
target_link_libraries(grpc-interop
|
||||
messages_proto_lib
|
||||
empty_proto_lib
|
||||
test_proto_lib
|
||||
android
|
||||
${log-lib})
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 26
|
||||
defaultConfig {
|
||||
applicationId "io.grpc.android.interop.cpp"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 26
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
// The paths to the protoc and grpc_cpp_plugin binaries on the host system (codegen
|
||||
// is not cross-compiled to Android)
|
||||
def protoc = project.hasProperty('protoc') ?
|
||||
project.property('protoc') : '/usr/local/bin/protoc'
|
||||
def grpc_cpp_plugin = project.hasProperty('grpc_cpp_plugin') ?
|
||||
project.property('grpc_cpp_plugin') : '/usr/local/bin/grpc_cpp_plugin'
|
||||
|
||||
cppFlags "-std=c++14 -frtti -fexceptions"
|
||||
arguments '-DANDROID_STL=c++_shared'
|
||||
arguments '-DRUN_HAVE_POSIX_REGEX=0'
|
||||
arguments '-DRUN_HAVE_STD_REGEX=0'
|
||||
arguments '-DRUN_HAVE_STEADY_CLOCK=0'
|
||||
arguments '-Dprotobuf_BUILD_PROTOC_BINARIES=off'
|
||||
arguments '-DgRPC_BUILD_CODEGEN=off'
|
||||
arguments '-DPROTOBUF_PROTOC_EXECUTABLE=' + protoc
|
||||
arguments '-DgRPC_CPP_PLUGIN_EXECUTABLE=' + grpc_cpp_plugin
|
||||
}
|
||||
}
|
||||
ndk.abiFilters 'x86'
|
||||
}
|
||||
buildTypes {
|
||||
debug {
|
||||
minifyEnabled false
|
||||
}
|
||||
release {
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path "CMakeLists.txt"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'com.android.support:appcompat-v7:26.1.0'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'com.android.support.test:runner:1.0.1'
|
||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
/*
|
||||
* Copyright 2018, gRPC Authors All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.grpc.interop.cpp;
|
||||
|
||||
import static junit.framework.Assert.assertTrue;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class InteropTest {
|
||||
private String host;
|
||||
private int port;
|
||||
private boolean useTls;
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
host =
|
||||
InstrumentationRegistry.getArguments()
|
||||
.getString("server_host", "grpc-test.sandbox.googleapis.com");
|
||||
port = Integer.parseInt(InstrumentationRegistry.getArguments().getString("server_port", "443"));
|
||||
useTls =
|
||||
Boolean.parseBoolean(InstrumentationRegistry.getArguments().getString("use_tls", "true"));
|
||||
|
||||
if (useTls) {
|
||||
Context ctx = InstrumentationRegistry.getTargetContext();
|
||||
String sslRootsFile = "roots.pem";
|
||||
InputStream in = ctx.getAssets().open(sslRootsFile);
|
||||
File outFile = new File(ctx.getExternalFilesDir(null), sslRootsFile);
|
||||
OutputStream out = new FileOutputStream(outFile);
|
||||
byte[] buffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while ((bytesRead = in.read(buffer)) != -1) {
|
||||
out.write(buffer, 0, bytesRead);
|
||||
}
|
||||
in.close();
|
||||
out.close();
|
||||
InteropActivity.configureSslRoots(outFile.getCanonicalPath());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void emptyUnary() {
|
||||
assertTrue(InteropActivity.doEmpty(host, port, useTls));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void largeUnary() {
|
||||
assertTrue(InteropActivity.doLargeUnary(host, port, useTls));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void emptyStream() {
|
||||
assertTrue(InteropActivity.doEmptyStream(host, port, useTls));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void requestStreaming() {
|
||||
assertTrue(InteropActivity.doRequestStreaming(host, port, useTls));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void responseStreaming() {
|
||||
assertTrue(InteropActivity.doResponseStreaming(host, port, useTls));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void pingPong() {
|
||||
assertTrue(InteropActivity.doPingPong(host, port, useTls));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="io.grpc.interop.cpp" >
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<application
|
||||
android:allowBackup="false"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/Base.V7.Theme.AppCompat.Light" >
|
||||
<activity
|
||||
android:name=".InteropActivity"
|
||||
android:label="@string/app_name" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,124 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2018 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <grpcpp/grpcpp.h>
|
||||
#include <jni.h>
|
||||
#include <src/core/lib/gpr/env.h>
|
||||
|
||||
#include "test/cpp/interop/interop_client.h"
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_io_grpc_interop_cpp_InteropActivity_configureSslRoots(JNIEnv* env,
|
||||
jobject obj_this,
|
||||
jstring path_raw) {
|
||||
const char* path = env->GetStringUTFChars(path_raw, (jboolean*)0);
|
||||
|
||||
gpr_setenv("GRPC_DEFAULT_SSL_ROOTS_FILE_PATH", path);
|
||||
}
|
||||
|
||||
std::shared_ptr<grpc::testing::InteropClient> GetClient(const char* host,
|
||||
int port,
|
||||
bool use_tls) {
|
||||
const int host_port_buf_size = 1024;
|
||||
char host_port[host_port_buf_size];
|
||||
snprintf(host_port, host_port_buf_size, "%s:%d", host, port);
|
||||
|
||||
std::shared_ptr<grpc::ChannelCredentials> credentials;
|
||||
if (use_tls) {
|
||||
credentials = grpc::SslCredentials(grpc::SslCredentialsOptions());
|
||||
} else {
|
||||
credentials = grpc::InsecureChannelCredentials();
|
||||
}
|
||||
|
||||
return std::shared_ptr<grpc::testing::InteropClient>(
|
||||
new grpc::testing::InteropClient(
|
||||
grpc::CreateChannel(host_port, credentials), true, false));
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jboolean JNICALL
|
||||
Java_io_grpc_interop_cpp_InteropActivity_doEmpty(JNIEnv* env, jobject obj_this,
|
||||
jstring host_raw,
|
||||
jint port_raw,
|
||||
jboolean use_tls_raw) {
|
||||
const char* host = env->GetStringUTFChars(host_raw, (jboolean*)0);
|
||||
int port = static_cast<int>(port_raw);
|
||||
bool use_tls = static_cast<bool>(use_tls_raw);
|
||||
|
||||
return GetClient(host, port, use_tls)->DoEmpty();
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jboolean JNICALL
|
||||
Java_io_grpc_interop_cpp_InteropActivity_doLargeUnary(JNIEnv* env,
|
||||
jobject obj_this,
|
||||
jstring host_raw,
|
||||
jint port_raw,
|
||||
jboolean use_tls_raw) {
|
||||
const char* host = env->GetStringUTFChars(host_raw, (jboolean*)0);
|
||||
int port = static_cast<int>(port_raw);
|
||||
bool use_tls = static_cast<bool>(use_tls_raw);
|
||||
|
||||
return GetClient(host, port, use_tls)->DoLargeUnary();
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jboolean JNICALL
|
||||
Java_io_grpc_interop_cpp_InteropActivity_doEmptyStream(JNIEnv* env,
|
||||
jobject obj_this,
|
||||
jstring host_raw,
|
||||
jint port_raw,
|
||||
jboolean use_tls_raw) {
|
||||
const char* host = env->GetStringUTFChars(host_raw, (jboolean*)0);
|
||||
int port = static_cast<int>(port_raw);
|
||||
bool use_tls = static_cast<bool>(use_tls_raw);
|
||||
|
||||
return GetClient(host, port, use_tls)->DoEmptyStream();
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jboolean JNICALL
|
||||
Java_io_grpc_interop_cpp_InteropActivity_doRequestStreaming(
|
||||
JNIEnv* env, jobject obj_this, jstring host_raw, jint port_raw,
|
||||
jboolean use_tls_raw) {
|
||||
const char* host = env->GetStringUTFChars(host_raw, (jboolean*)0);
|
||||
int port = static_cast<int>(port_raw);
|
||||
bool use_tls = static_cast<bool>(use_tls_raw);
|
||||
|
||||
return GetClient(host, port, use_tls)->DoRequestStreaming();
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jboolean JNICALL
|
||||
Java_io_grpc_interop_cpp_InteropActivity_doResponseStreaming(
|
||||
JNIEnv* env, jobject obj_this, jstring host_raw, jint port_raw,
|
||||
jboolean use_tls_raw) {
|
||||
const char* host = env->GetStringUTFChars(host_raw, (jboolean*)0);
|
||||
int port = static_cast<int>(port_raw);
|
||||
bool use_tls = static_cast<bool>(use_tls_raw);
|
||||
|
||||
return GetClient(host, port, use_tls)->DoResponseStreaming();
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jboolean JNICALL
|
||||
Java_io_grpc_interop_cpp_InteropActivity_doPingPong(JNIEnv* env,
|
||||
jobject obj_this,
|
||||
jstring host_raw,
|
||||
jint port_raw,
|
||||
jboolean use_tls_raw) {
|
||||
const char* host = env->GetStringUTFChars(host_raw, (jboolean*)0);
|
||||
int port = static_cast<int>(port_raw);
|
||||
bool use_tls = static_cast<bool>(use_tls_raw);
|
||||
|
||||
return GetClient(host, port, use_tls)->DoPingPong();
|
||||
}
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
/*
|
||||
* Copyright 2018, gRPC Authors All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.grpc.interop.cpp;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.text.TextUtils;
|
||||
import android.text.method.ScrollingMovementMethod;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
public class InteropActivity extends AppCompatActivity {
|
||||
|
||||
static {
|
||||
System.loadLibrary("grpc-interop");
|
||||
}
|
||||
|
||||
private Button sendButton;
|
||||
private EditText hostEdit;
|
||||
private EditText portEdit;
|
||||
private TextView resultText;
|
||||
private GrpcTask grpcTask;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_interop);
|
||||
sendButton = (Button) findViewById(R.id.ping_pong_button);
|
||||
hostEdit = (EditText) findViewById(R.id.host_edit_text);
|
||||
portEdit = (EditText) findViewById(R.id.port_edit_text);
|
||||
resultText = (TextView) findViewById(R.id.grpc_result_text);
|
||||
resultText.setMovementMethod(new ScrollingMovementMethod());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
if (grpcTask != null) {
|
||||
grpcTask.cancel(true);
|
||||
grpcTask = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void doPingPong(View view) {
|
||||
((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE))
|
||||
.hideSoftInputFromWindow(hostEdit.getWindowToken(), 0);
|
||||
sendButton.setEnabled(false);
|
||||
resultText.setText("");
|
||||
grpcTask = new GrpcTask(this);
|
||||
grpcTask.executeOnExecutor(
|
||||
AsyncTask.THREAD_POOL_EXECUTOR,
|
||||
hostEdit.getText().toString(),
|
||||
portEdit.getText().toString());
|
||||
}
|
||||
|
||||
private static class GrpcTask extends AsyncTask<String, Void, String> {
|
||||
private final WeakReference<InteropActivity> activityReference;
|
||||
|
||||
private GrpcTask(InteropActivity activity) {
|
||||
this.activityReference = new WeakReference<InteropActivity>(activity);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String doInBackground(String... params) {
|
||||
String host = params[0];
|
||||
String portStr = params[1];
|
||||
int port = TextUtils.isEmpty(portStr) ? 50051 : Integer.valueOf(portStr);
|
||||
// TODO(ericgribkoff) Support other test cases in the app UI
|
||||
if (doPingPong(host, port, false)) {
|
||||
return "Success";
|
||||
} else {
|
||||
return "Failure";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(String result) {
|
||||
InteropActivity activity = activityReference.get();
|
||||
if (activity == null || isCancelled()) {
|
||||
return;
|
||||
}
|
||||
TextView resultText = (TextView) activity.findViewById(R.id.grpc_result_text);
|
||||
Button sendButton = (Button) activity.findViewById(R.id.ping_pong_button);
|
||||
resultText.setText(result);
|
||||
sendButton.setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
public static native void configureSslRoots(String path);
|
||||
|
||||
public static native boolean doEmpty(String host, int port, boolean useTls);
|
||||
|
||||
public static native boolean doLargeUnary(String host, int port, boolean useTls);
|
||||
|
||||
public static native boolean doEmptyStream(String host, int port, boolean useTls);
|
||||
|
||||
public static native boolean doRequestStreaming(String host, int port, boolean useTls);
|
||||
|
||||
public static native boolean doResponseStreaming(String host, int port, boolean useTls);
|
||||
|
||||
public static native boolean doPingPong(String host, int port, boolean useTls);
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".InteropActivity"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<EditText
|
||||
android:id="@+id/host_edit_text"
|
||||
android:layout_weight="2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Enter Host" />
|
||||
<EditText
|
||||
android:id="@+id/port_edit_text"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberDecimal"
|
||||
android:hint="Enter Port" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/ping_pong_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="doPingPong"
|
||||
android:text="Ping Pong" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:textSize="16sp"
|
||||
android:text="Result:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/grpc_result_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars = "vertical"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.5 KiB |
|
|
@ -0,0 +1,3 @@
|
|||
<resources>
|
||||
<string name="app_name">gRPC C++ Interop App</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.0.1'
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue