grpc 1.49.1-x86_64-linux → 1.50.0.pre1-x86_64-linux
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of grpc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Makefile +54 -153
- data/include/grpc/event_engine/endpoint_config.h +11 -5
- data/include/grpc/event_engine/event_engine.h +1 -1
- data/include/grpc/impl/codegen/atm_gcc_atomic.h +19 -28
- data/include/grpc/impl/codegen/atm_gcc_sync.h +0 -2
- data/include/grpc/impl/codegen/atm_windows.h +0 -2
- data/include/grpc/impl/codegen/grpc_types.h +6 -0
- data/src/core/ext/filters/channel_idle/channel_idle_filter.cc +3 -3
- data/src/core/ext/filters/client_channel/backup_poller.cc +4 -6
- data/src/core/ext/filters/client_channel/client_channel.cc +33 -22
- data/src/core/ext/filters/client_channel/client_channel.h +1 -1
- data/src/core/ext/filters/client_channel/client_channel_plugin.cc +0 -16
- data/src/core/ext/filters/client_channel/http_proxy.cc +12 -19
- data/src/core/ext/filters/client_channel/http_proxy.h +3 -2
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +6 -4
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h +5 -4
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +0 -2
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +112 -96
- data/src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc +20 -11
- data/src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc +106 -108
- data/src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h +16 -0
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +20 -13
- data/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +165 -257
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc +218 -231
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h +10 -6
- data/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc +389 -444
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +16 -16
- data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +8 -13
- data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +84 -96
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +38 -37
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc +106 -186
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc +106 -93
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc +170 -218
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +2 -2
- data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc +13 -15
- data/src/core/ext/filters/client_channel/resolver/polling_resolver.cc +84 -37
- data/src/core/ext/filters/client_channel/resolver/polling_resolver.h +11 -0
- data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +1 -0
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +5 -3
- data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +5 -4
- data/src/core/ext/filters/client_channel/retry_filter.cc +25 -29
- data/src/core/ext/filters/client_channel/subchannel.cc +38 -33
- data/src/core/ext/filters/client_channel/subchannel.h +12 -3
- data/src/core/ext/filters/client_channel/subchannel_stream_client.cc +1 -2
- data/src/core/ext/filters/fault_injection/fault_injection_filter.cc +23 -16
- data/src/core/ext/filters/fault_injection/fault_injection_filter.h +8 -0
- data/src/core/ext/filters/http/client/http_client_filter.cc +1 -2
- data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +2 -4
- data/src/core/ext/filters/http/message_compress/message_decompress_filter.cc +0 -2
- data/src/core/ext/filters/http/server/http_server_filter.cc +1 -2
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +12 -8
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +32 -26
- data/src/core/ext/transport/chttp2/transport/bin_encoder.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +25 -130
- data/src/core/ext/transport/chttp2/transport/decode_huff.cc +287 -0
- data/src/core/ext/transport/chttp2/transport/decode_huff.h +1018 -0
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +83 -51
- data/src/core/ext/transport/chttp2/transport/flow_control.h +11 -6
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +1 -2
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +2 -20
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +28 -28
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc +1 -10
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.h +11 -6
- data/src/core/ext/transport/chttp2/transport/internal.h +2 -0
- data/src/core/ext/transport/chttp2/transport/parsing.cc +44 -0
- data/src/core/ext/transport/chttp2/transport/writing.cc +3 -14
- data/src/core/ext/transport/inproc/inproc_transport.cc +1 -3
- data/src/core/ext/xds/certificate_provider_store.cc +63 -3
- data/src/core/ext/xds/certificate_provider_store.h +9 -1
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.cc +5 -5
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.h +1 -1
- data/src/core/ext/xds/xds_api.cc +21 -17
- data/src/core/ext/xds/xds_api.h +7 -0
- data/src/core/ext/xds/xds_bootstrap.cc +5 -537
- data/src/core/ext/xds/xds_bootstrap.h +39 -111
- data/src/core/ext/xds/xds_bootstrap_grpc.cc +370 -0
- data/src/core/ext/xds/xds_bootstrap_grpc.h +169 -0
- data/src/core/ext/xds/xds_client.cc +219 -145
- data/src/core/ext/xds/xds_client.h +19 -17
- data/src/core/ext/xds/xds_client_grpc.cc +18 -80
- data/src/core/ext/xds/xds_client_grpc.h +2 -25
- data/src/core/ext/xds/xds_client_stats.cc +4 -4
- data/src/core/ext/xds/xds_cluster.cc +87 -79
- data/src/core/ext/xds/xds_cluster.h +5 -5
- data/src/core/ext/xds/xds_cluster_specifier_plugin.cc +3 -1
- data/src/core/ext/xds/xds_common_types.cc +13 -5
- data/src/core/ext/xds/xds_endpoint.cc +8 -6
- data/src/core/ext/xds/xds_endpoint.h +3 -4
- data/src/core/ext/xds/xds_lb_policy_registry.cc +4 -2
- data/src/core/ext/xds/xds_listener.cc +25 -20
- data/src/core/ext/xds/xds_listener.h +3 -4
- data/src/core/ext/xds/xds_resource_type.h +11 -8
- data/src/core/ext/xds/xds_route_config.cc +15 -16
- data/src/core/ext/xds/xds_route_config.h +3 -3
- data/src/core/ext/xds/xds_server_config_fetcher.cc +7 -5
- data/src/core/ext/xds/xds_transport_grpc.cc +15 -7
- data/src/core/lib/backoff/backoff.cc +2 -4
- data/src/core/lib/channel/call_finalization.h +1 -3
- data/src/core/lib/channel/channel_args.h +114 -14
- data/src/core/lib/channel/channel_trace.cc +3 -4
- data/src/core/lib/channel/promise_based_filter.cc +18 -19
- data/src/core/lib/channel/status_util.cc +27 -0
- data/src/core/lib/channel/status_util.h +10 -0
- data/src/core/lib/config/core_configuration.cc +5 -1
- data/src/core/lib/config/core_configuration.h +33 -0
- data/src/core/lib/debug/stats.cc +26 -30
- data/src/core/lib/debug/stats.h +2 -12
- data/src/core/lib/debug/stats_data.cc +118 -614
- data/src/core/lib/debug/stats_data.h +67 -465
- data/src/core/lib/debug/trace.cc +0 -2
- data/src/core/lib/event_engine/channel_args_endpoint_config.cc +12 -20
- data/src/core/lib/event_engine/channel_args_endpoint_config.h +13 -7
- data/src/core/lib/event_engine/forkable.cc +1 -1
- data/src/core/lib/event_engine/poller.h +14 -12
- data/src/core/lib/event_engine/posix_engine/timer_manager.cc +53 -32
- data/src/core/lib/event_engine/posix_engine/timer_manager.h +23 -1
- data/src/core/lib/event_engine/thread_pool.cc +131 -94
- data/src/core/lib/event_engine/thread_pool.h +56 -23
- data/src/core/lib/event_engine/time_util.cc +30 -0
- data/src/core/lib/event_engine/time_util.h +32 -0
- data/src/core/lib/event_engine/utils.cc +0 -5
- data/src/core/lib/event_engine/utils.h +0 -4
- data/src/core/lib/event_engine/windows/iocp.cc +13 -7
- data/src/core/lib/event_engine/windows/iocp.h +2 -1
- data/src/core/lib/event_engine/windows/win_socket.cc +1 -1
- data/src/core/lib/experiments/config.cc +146 -0
- data/src/core/lib/experiments/config.h +43 -0
- data/src/core/lib/experiments/experiments.cc +75 -0
- data/src/core/lib/experiments/experiments.h +56 -0
- data/src/core/lib/gpr/alloc.cc +1 -9
- data/src/core/lib/gpr/log_windows.cc +0 -1
- data/src/core/lib/gpr/string_util_windows.cc +3 -30
- data/src/core/lib/gpr/sync_abseil.cc +0 -14
- data/src/core/lib/gpr/sync_posix.cc +0 -14
- data/src/core/lib/gpr/time_posix.cc +0 -6
- data/src/core/lib/gpr/time_precise.h +1 -1
- data/src/core/lib/gpr/tmpfile_windows.cc +5 -7
- data/src/core/lib/gpr/useful.h +11 -0
- data/src/core/lib/{gpr → gprpp}/env.h +25 -12
- data/src/core/lib/{gpr → gprpp}/env_linux.cc +20 -15
- data/src/core/lib/{gpr → gprpp}/env_posix.cc +11 -10
- data/src/core/lib/gprpp/env_windows.cc +56 -0
- data/src/core/lib/gprpp/fork.cc +14 -22
- data/src/core/lib/gprpp/fork.h +0 -8
- data/src/core/lib/gprpp/global_config_env.cc +7 -6
- data/src/core/lib/gprpp/notification.h +67 -0
- data/src/core/lib/gprpp/packed_table.h +40 -0
- data/src/core/lib/gprpp/ref_counted_ptr.h +20 -33
- data/src/core/lib/gprpp/sorted_pack.h +98 -0
- data/src/core/lib/gprpp/status_helper.h +6 -0
- data/src/core/lib/gprpp/table.h +9 -1
- data/src/core/lib/gprpp/tchar.cc +49 -0
- data/src/core/lib/gprpp/tchar.h +33 -0
- data/src/core/lib/gprpp/time.cc +21 -0
- data/src/core/lib/gprpp/time.h +55 -0
- data/src/core/lib/gprpp/validation_errors.cc +61 -0
- data/src/core/lib/gprpp/validation_errors.h +110 -0
- data/src/core/{ext/filters/client_channel → lib/handshaker}/proxy_mapper.h +3 -3
- data/src/core/{ext/filters/client_channel → lib/handshaker}/proxy_mapper_registry.cc +14 -36
- data/src/core/lib/handshaker/proxy_mapper_registry.h +75 -0
- data/src/core/lib/iomgr/call_combiner.cc +0 -8
- data/src/core/lib/iomgr/closure.h +0 -1
- data/src/core/lib/iomgr/endpoint_pair_posix.cc +14 -10
- data/src/core/lib/iomgr/endpoint_pair_windows.cc +2 -2
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +1 -38
- data/src/core/lib/iomgr/ev_poll_posix.cc +2 -17
- data/src/core/lib/iomgr/exec_ctx.cc +0 -10
- data/src/core/lib/iomgr/exec_ctx.h +7 -31
- data/src/core/lib/iomgr/iocp_windows.cc +1 -2
- data/src/core/lib/iomgr/iomgr.cc +6 -8
- data/src/core/lib/iomgr/iomgr_fwd.h +1 -0
- data/src/core/lib/iomgr/pollset.h +1 -1
- data/src/core/lib/iomgr/pollset_set.h +0 -1
- data/src/core/lib/iomgr/resolve_address.h +1 -0
- data/src/core/lib/iomgr/resolve_address_impl.h +1 -0
- data/src/core/lib/iomgr/resolve_address_posix.cc +1 -0
- data/src/core/lib/iomgr/resolve_address_windows.cc +1 -0
- data/src/core/lib/iomgr/sockaddr_utils_posix.cc +2 -1
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +12 -34
- data/src/core/lib/iomgr/socket_utils_posix.cc +83 -1
- data/src/core/lib/iomgr/socket_utils_posix.h +98 -6
- data/src/core/lib/iomgr/tcp_client.cc +6 -7
- data/src/core/lib/iomgr/tcp_client.h +11 -11
- data/src/core/lib/iomgr/tcp_client_cfstream.cc +6 -6
- data/src/core/lib/iomgr/tcp_client_posix.cc +33 -29
- data/src/core/lib/iomgr/tcp_client_posix.h +12 -9
- data/src/core/lib/iomgr/tcp_client_windows.cc +6 -6
- data/src/core/lib/iomgr/tcp_posix.cc +131 -114
- data/src/core/lib/iomgr/tcp_posix.h +3 -1
- data/src/core/lib/iomgr/tcp_server.cc +5 -4
- data/src/core/lib/iomgr/tcp_server.h +9 -6
- data/src/core/lib/iomgr/tcp_server_posix.cc +17 -28
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +2 -2
- data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +3 -3
- data/src/core/lib/iomgr/tcp_server_windows.cc +6 -7
- data/src/core/lib/iomgr/tcp_windows.cc +0 -1
- data/src/core/lib/iomgr/tcp_windows.h +0 -1
- data/src/core/lib/iomgr/timer_generic.cc +4 -4
- data/src/core/lib/iomgr/timer_manager.cc +1 -2
- data/src/core/lib/iomgr/wakeup_fd_eventfd.cc +0 -2
- data/src/core/lib/json/json_object_loader.cc +21 -52
- data/src/core/lib/json/json_object_loader.h +56 -76
- data/src/core/lib/json/json_util.cc +2 -1
- data/src/core/lib/load_balancing/lb_policy.h +5 -5
- data/src/core/lib/load_balancing/lb_policy_registry.cc +29 -55
- data/src/core/lib/load_balancing/lb_policy_registry.h +23 -11
- data/src/core/lib/promise/activity.h +2 -3
- data/src/core/lib/promise/context.h +1 -1
- data/src/core/lib/promise/sleep.cc +16 -4
- data/src/core/lib/promise/sleep.h +8 -2
- data/src/core/lib/resolver/resolver.h +13 -3
- data/src/core/lib/resource_quota/api.cc +9 -0
- data/src/core/lib/resource_quota/api.h +6 -0
- data/src/core/lib/resource_quota/arena.cc +1 -3
- data/src/core/lib/resource_quota/memory_quota.cc +8 -24
- data/src/core/lib/resource_quota/memory_quota.h +6 -19
- data/src/core/lib/resource_quota/periodic_update.cc +2 -3
- data/src/core/{ext/xds → lib/security/certificate_provider}/certificate_provider_factory.h +3 -3
- data/src/core/lib/security/certificate_provider/certificate_provider_registry.cc +60 -0
- data/src/core/lib/security/certificate_provider/certificate_provider_registry.h +70 -0
- data/src/core/lib/security/credentials/channel_creds_registry_init.cc +1 -0
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +15 -16
- data/src/core/lib/security/credentials/external/external_account_credentials.cc +2 -1
- data/src/core/lib/security/credentials/google_default/credentials_generic.cc +5 -8
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +6 -6
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +3 -2
- data/src/core/lib/security/credentials/jwt/jwt_verifier.h +1 -1
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +1 -2
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +4 -3
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h +4 -2
- data/src/core/lib/security/credentials/tls/tls_utils.cc +3 -1
- data/src/core/lib/security/transport/client_auth_filter.cc +12 -1
- data/src/core/lib/security/transport/secure_endpoint.cc +0 -4
- data/src/core/lib/surface/call.cc +1 -11
- data/src/core/lib/surface/channel.cc +3 -2
- data/src/core/lib/surface/completion_queue.cc +16 -28
- data/src/core/lib/surface/completion_queue.h +1 -1
- data/src/core/lib/surface/completion_queue_factory.cc +5 -0
- data/src/core/lib/surface/init.cc +16 -11
- data/src/core/lib/surface/init_internally.cc +24 -0
- data/src/core/lib/surface/init_internally.h +28 -0
- data/src/core/lib/surface/server.cc +1 -7
- data/src/core/lib/surface/server.h +4 -6
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/bdp_estimator.cc +1 -3
- data/src/core/lib/transport/metadata_batch.cc +2 -3
- data/src/core/lib/transport/metadata_batch.h +9 -7
- data/src/core/lib/transport/parsed_metadata.h +4 -2
- data/src/core/lib/transport/status_conversion.cc +1 -3
- data/src/core/lib/transport/tcp_connect_handshaker.cc +9 -5
- data/src/core/lib/transport/transport.h +0 -1
- data/src/core/lib/transport/transport_impl.h +0 -1
- data/src/core/plugin_registry/grpc_plugin_registry.cc +23 -46
- data/src/core/plugin_registry/grpc_plugin_registry_extra.cc +13 -25
- data/src/ruby/lib/grpc/2.6/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/2.7/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/3.0/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/3.1/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/spec/channel_spec.rb +5 -0
- data/src/ruby/spec/generic/server_interceptors_spec.rb +1 -1
- data/src/ruby/spec/user_agent_spec.rb +1 -1
- metadata +33 -19
- data/src/core/ext/filters/client_channel/proxy_mapper_registry.h +0 -56
- data/src/core/ext/xds/certificate_provider_registry.cc +0 -103
- data/src/core/ext/xds/certificate_provider_registry.h +0 -59
- data/src/core/lib/event_engine/promise.h +0 -78
- data/src/core/lib/gpr/env_windows.cc +0 -74
- data/src/core/lib/gpr/string_windows.h +0 -32
- data/src/core/lib/profiling/basic_timers.cc +0 -295
- data/src/core/lib/profiling/stap_timers.cc +0 -50
- data/src/core/lib/profiling/timers.h +0 -94
@@ -27,53 +27,10 @@
|
|
27
27
|
|
28
28
|
extern void grpc_register_extra_plugins(void);
|
29
29
|
|
30
|
-
void grpc_chttp2_plugin_init(void);
|
31
|
-
void grpc_chttp2_plugin_shutdown(void);
|
32
|
-
void grpc_client_channel_init(void);
|
33
|
-
void grpc_client_channel_shutdown(void);
|
34
|
-
void grpc_lb_policy_grpclb_init(void);
|
35
|
-
void grpc_lb_policy_grpclb_shutdown(void);
|
36
|
-
void grpc_lb_policy_priority_init(void);
|
37
|
-
void grpc_lb_policy_priority_shutdown(void);
|
38
|
-
void grpc_lb_policy_outlier_detection_init(void);
|
39
|
-
void grpc_lb_policy_outlier_detection_shutdown(void);
|
40
|
-
void grpc_lb_policy_weighted_target_init(void);
|
41
|
-
void grpc_lb_policy_weighted_target_shutdown(void);
|
42
|
-
void grpc_lb_policy_pick_first_init(void);
|
43
|
-
void grpc_lb_policy_pick_first_shutdown(void);
|
44
|
-
void grpc_lb_policy_round_robin_init(void);
|
45
|
-
void grpc_lb_policy_round_robin_shutdown(void);
|
46
30
|
void grpc_resolver_dns_ares_init(void);
|
47
31
|
void grpc_resolver_dns_ares_shutdown(void);
|
48
|
-
namespace grpc_core {
|
49
|
-
void GrpcLbPolicyRingHashInit(void);
|
50
|
-
void GrpcLbPolicyRingHashShutdown(void);
|
51
|
-
#ifndef GRPC_NO_RLS
|
52
|
-
void RlsLbPluginInit();
|
53
|
-
void RlsLbPluginShutdown();
|
54
|
-
#endif // !GRPC_NO_RLS
|
55
|
-
} // namespace grpc_core
|
56
32
|
|
57
33
|
void grpc_register_built_in_plugins(void) {
|
58
|
-
grpc_register_plugin(grpc_client_channel_init, grpc_client_channel_shutdown);
|
59
|
-
grpc_register_plugin(grpc_lb_policy_grpclb_init,
|
60
|
-
grpc_lb_policy_grpclb_shutdown);
|
61
|
-
#ifndef GRPC_NO_RLS
|
62
|
-
grpc_register_plugin(grpc_core::RlsLbPluginInit,
|
63
|
-
grpc_core::RlsLbPluginShutdown);
|
64
|
-
#endif // !GRPC_NO_RLS
|
65
|
-
grpc_register_plugin(grpc_lb_policy_outlier_detection_init,
|
66
|
-
grpc_lb_policy_outlier_detection_shutdown);
|
67
|
-
grpc_register_plugin(grpc_lb_policy_priority_init,
|
68
|
-
grpc_lb_policy_priority_shutdown);
|
69
|
-
grpc_register_plugin(grpc_lb_policy_weighted_target_init,
|
70
|
-
grpc_lb_policy_weighted_target_shutdown);
|
71
|
-
grpc_register_plugin(grpc_lb_policy_pick_first_init,
|
72
|
-
grpc_lb_policy_pick_first_shutdown);
|
73
|
-
grpc_register_plugin(grpc_lb_policy_round_robin_init,
|
74
|
-
grpc_lb_policy_round_robin_shutdown);
|
75
|
-
grpc_register_plugin(grpc_core::GrpcLbPolicyRingHashInit,
|
76
|
-
grpc_core::GrpcLbPolicyRingHashShutdown);
|
77
34
|
grpc_register_plugin(grpc_resolver_dns_ares_init,
|
78
35
|
grpc_resolver_dns_ares_shutdown);
|
79
36
|
grpc_register_extra_plugins();
|
@@ -88,8 +45,7 @@ extern void SecurityRegisterHandshakerFactories(
|
|
88
45
|
extern void RegisterClientAuthorityFilter(CoreConfiguration::Builder* builder);
|
89
46
|
extern void RegisterChannelIdleFilters(CoreConfiguration::Builder* builder);
|
90
47
|
extern void RegisterDeadlineFilter(CoreConfiguration::Builder* builder);
|
91
|
-
extern void
|
92
|
-
CoreConfiguration::Builder* builder);
|
48
|
+
extern void RegisterGrpcLbPolicy(CoreConfiguration::Builder* builder);
|
93
49
|
extern void RegisterHttpFilters(CoreConfiguration::Builder* builder);
|
94
50
|
extern void RegisterMessageSizeFilter(CoreConfiguration::Builder* builder);
|
95
51
|
extern void RegisterSecurityFilters(CoreConfiguration::Builder* builder);
|
@@ -102,6 +58,17 @@ extern void RegisterNativeDnsResolver(CoreConfiguration::Builder* builder);
|
|
102
58
|
extern void RegisterAresDnsResolver(CoreConfiguration::Builder* builder);
|
103
59
|
extern void RegisterSockaddrResolver(CoreConfiguration::Builder* builder);
|
104
60
|
extern void RegisterFakeResolver(CoreConfiguration::Builder* builder);
|
61
|
+
extern void RegisterPriorityLbPolicy(CoreConfiguration::Builder* builder);
|
62
|
+
extern void RegisterOutlierDetectionLbPolicy(
|
63
|
+
CoreConfiguration::Builder* builder);
|
64
|
+
extern void RegisterWeightedTargetLbPolicy(CoreConfiguration::Builder* builder);
|
65
|
+
extern void RegisterPickFirstLbPolicy(CoreConfiguration::Builder* builder);
|
66
|
+
extern void RegisterRoundRobinLbPolicy(CoreConfiguration::Builder* builder);
|
67
|
+
extern void RegisterRingHashLbPolicy(CoreConfiguration::Builder* builder);
|
68
|
+
extern void RegisterHttpProxyMapper(CoreConfiguration::Builder* builder);
|
69
|
+
#ifndef GRPC_NO_RLS
|
70
|
+
extern void RegisterRlsLbPolicy(CoreConfiguration::Builder* builder);
|
71
|
+
#endif // !GRPC_NO_RLS
|
105
72
|
#ifdef GPR_SUPPORT_BINDER_TRANSPORT
|
106
73
|
extern void RegisterBinderResolver(CoreConfiguration::Builder* builder);
|
107
74
|
#endif
|
@@ -112,11 +79,17 @@ void BuildCoreConfiguration(CoreConfiguration::Builder* builder) {
|
|
112
79
|
// the start of the handshaker list.
|
113
80
|
RegisterHttpConnectHandshaker(builder);
|
114
81
|
RegisterTCPConnectHandshaker(builder);
|
82
|
+
RegisterPriorityLbPolicy(builder);
|
83
|
+
RegisterOutlierDetectionLbPolicy(builder);
|
84
|
+
RegisterWeightedTargetLbPolicy(builder);
|
85
|
+
RegisterPickFirstLbPolicy(builder);
|
86
|
+
RegisterRoundRobinLbPolicy(builder);
|
87
|
+
RegisterRingHashLbPolicy(builder);
|
115
88
|
BuildClientChannelConfiguration(builder);
|
116
89
|
SecurityRegisterHandshakerFactories(builder);
|
117
90
|
RegisterClientAuthorityFilter(builder);
|
118
91
|
RegisterChannelIdleFilters(builder);
|
119
|
-
|
92
|
+
RegisterGrpcLbPolicy(builder);
|
120
93
|
RegisterHttpFilters(builder);
|
121
94
|
RegisterDeadlineFilter(builder);
|
122
95
|
RegisterMessageSizeFilter(builder);
|
@@ -127,9 +100,13 @@ void BuildCoreConfiguration(CoreConfiguration::Builder* builder) {
|
|
127
100
|
RegisterNativeDnsResolver(builder);
|
128
101
|
RegisterSockaddrResolver(builder);
|
129
102
|
RegisterFakeResolver(builder);
|
103
|
+
RegisterHttpProxyMapper(builder);
|
130
104
|
#ifdef GPR_SUPPORT_BINDER_TRANSPORT
|
131
105
|
RegisterBinderResolver(builder);
|
132
106
|
#endif
|
107
|
+
#ifndef GRPC_NO_RLS
|
108
|
+
RegisterRlsLbPolicy(builder);
|
109
|
+
#endif // !GRPC_NO_RLS
|
133
110
|
// Run last so it gets a consistent location.
|
134
111
|
// TODO(ctiller): Is this actually necessary?
|
135
112
|
RegisterSecurityFilters(builder);
|
@@ -26,37 +26,12 @@ namespace grpc_core {
|
|
26
26
|
void XdsClientGlobalInit();
|
27
27
|
void XdsClientGlobalShutdown();
|
28
28
|
} // namespace grpc_core
|
29
|
-
void grpc_certificate_provider_registry_init(void);
|
30
|
-
void grpc_certificate_provider_registry_shutdown(void);
|
31
|
-
namespace grpc_core {
|
32
|
-
void FileWatcherCertificateProviderInit();
|
33
|
-
void FileWatcherCertificateProviderShutdown();
|
34
|
-
} // namespace grpc_core
|
35
|
-
void grpc_lb_policy_cds_init(void);
|
36
|
-
void grpc_lb_policy_cds_shutdown(void);
|
37
|
-
void grpc_lb_policy_xds_cluster_impl_init(void);
|
38
|
-
void grpc_lb_policy_xds_cluster_impl_shutdown(void);
|
39
|
-
void grpc_lb_policy_xds_cluster_resolver_init(void);
|
40
|
-
void grpc_lb_policy_xds_cluster_resolver_shutdown(void);
|
41
|
-
void grpc_lb_policy_xds_cluster_manager_init(void);
|
42
|
-
void grpc_lb_policy_xds_cluster_manager_shutdown(void);
|
43
29
|
#endif
|
44
30
|
|
45
31
|
void grpc_register_extra_plugins() {
|
46
32
|
#ifndef GRPC_NO_XDS
|
47
33
|
grpc_register_plugin(grpc_core::XdsClientGlobalInit,
|
48
34
|
grpc_core::XdsClientGlobalShutdown);
|
49
|
-
grpc_register_plugin(grpc_certificate_provider_registry_init,
|
50
|
-
grpc_certificate_provider_registry_shutdown);
|
51
|
-
grpc_register_plugin(grpc_core::FileWatcherCertificateProviderInit,
|
52
|
-
grpc_core::FileWatcherCertificateProviderShutdown);
|
53
|
-
grpc_register_plugin(grpc_lb_policy_cds_init, grpc_lb_policy_cds_shutdown);
|
54
|
-
grpc_register_plugin(grpc_lb_policy_xds_cluster_impl_init,
|
55
|
-
grpc_lb_policy_xds_cluster_impl_shutdown);
|
56
|
-
grpc_register_plugin(grpc_lb_policy_xds_cluster_resolver_init,
|
57
|
-
grpc_lb_policy_xds_cluster_resolver_shutdown);
|
58
|
-
grpc_register_plugin(grpc_lb_policy_xds_cluster_manager_init,
|
59
|
-
grpc_lb_policy_xds_cluster_manager_shutdown);
|
60
35
|
#endif
|
61
36
|
}
|
62
37
|
|
@@ -68,6 +43,14 @@ extern void RegisterXdsChannelStackModifier(
|
|
68
43
|
extern void RegisterChannelDefaultCreds(CoreConfiguration::Builder* builder);
|
69
44
|
extern void RegisterXdsResolver(CoreConfiguration::Builder* builder);
|
70
45
|
extern void RegisterCloud2ProdResolver(CoreConfiguration::Builder* builder);
|
46
|
+
extern void RegisterXdsClusterManagerLbPolicy(
|
47
|
+
CoreConfiguration::Builder* builder);
|
48
|
+
extern void RegisterXdsClusterImplLbPolicy(CoreConfiguration::Builder* builder);
|
49
|
+
extern void RegisterCdsLbPolicy(CoreConfiguration::Builder* builder);
|
50
|
+
extern void RegisterXdsClusterResolverLbPolicy(
|
51
|
+
CoreConfiguration::Builder* builder);
|
52
|
+
extern void RegisterFileWatcherCertificateProvider(
|
53
|
+
CoreConfiguration::Builder* builder);
|
71
54
|
#endif
|
72
55
|
void RegisterExtraFilters(CoreConfiguration::Builder* builder) {
|
73
56
|
// Use builder to avoid unused-parameter warning.
|
@@ -80,6 +63,11 @@ void RegisterExtraFilters(CoreConfiguration::Builder* builder) {
|
|
80
63
|
RegisterChannelDefaultCreds(builder);
|
81
64
|
RegisterXdsResolver(builder);
|
82
65
|
RegisterCloud2ProdResolver(builder);
|
66
|
+
RegisterXdsClusterManagerLbPolicy(builder);
|
67
|
+
RegisterXdsClusterImplLbPolicy(builder);
|
68
|
+
RegisterCdsLbPolicy(builder);
|
69
|
+
RegisterXdsClusterResolverLbPolicy(builder);
|
70
|
+
RegisterFileWatcherCertificateProvider(builder);
|
83
71
|
#endif
|
84
72
|
}
|
85
73
|
} // namespace grpc_core
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/src/ruby/lib/grpc/grpc_c.so
CHANGED
Binary file
|
@@ -154,14 +154,19 @@ describe GRPC::Core::Channel do
|
|
154
154
|
end
|
155
155
|
|
156
156
|
it 'raises an error if called on a closed channel' do
|
157
|
+
STDERR.puts "#{Time.now}: begin: raises an error if called on a closed channel"
|
157
158
|
ch = GRPC::Core::Channel.new(fake_host, nil, :this_channel_is_insecure)
|
159
|
+
STDERR.puts "#{Time.now}: created channel"
|
158
160
|
ch.close
|
161
|
+
STDERR.puts "#{Time.now}: closed channel"
|
159
162
|
|
160
163
|
deadline = Time.now + 5
|
161
164
|
blk = proc do
|
162
165
|
ch.create_call(nil, nil, 'phony_method', nil, deadline)
|
166
|
+
STDERR.puts "#{Time.now}: created call"
|
163
167
|
end
|
164
168
|
expect(&blk).to raise_error(RuntimeError)
|
169
|
+
STDERR.puts "#{Time.now}: finished: raises an error if called on a closed channel"
|
165
170
|
end
|
166
171
|
|
167
172
|
it 'raises if grpc was initialized in another process' do
|
@@ -17,7 +17,7 @@ describe 'Server Interceptors' do
|
|
17
17
|
let(:interceptor) { TestServerInterceptor.new }
|
18
18
|
let(:request) { EchoMsg.new }
|
19
19
|
let(:trailing_metadata) { {} }
|
20
|
-
let(:service) { EchoService.new(trailing_metadata) }
|
20
|
+
let(:service) { EchoService.new(**trailing_metadata) }
|
21
21
|
let(:interceptors) { [] }
|
22
22
|
|
23
23
|
before(:each) do
|
@@ -49,7 +49,7 @@ describe 'user agent' do
|
|
49
49
|
it 'client sends expected user agent' do
|
50
50
|
stub = UserAgentEchoServiceStub.new("localhost:#{@port}",
|
51
51
|
:this_channel_is_insecure,
|
52
|
-
{})
|
52
|
+
channel_args: {})
|
53
53
|
response = stub.an_rpc(EchoMsg.new)
|
54
54
|
expected_user_agent_prefix = "grpc-ruby/#{GRPC::VERSION}"
|
55
55
|
expect(response.msg.start_with?(expected_user_agent_prefix)).to be true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grpc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.50.0.pre1
|
5
5
|
platform: x86_64-linux
|
6
6
|
authors:
|
7
7
|
- gRPC Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: src/ruby/bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -337,9 +337,6 @@ files:
|
|
337
337
|
- src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc
|
338
338
|
- src/core/ext/filters/client_channel/local_subchannel_pool.cc
|
339
339
|
- src/core/ext/filters/client_channel/local_subchannel_pool.h
|
340
|
-
- src/core/ext/filters/client_channel/proxy_mapper.h
|
341
|
-
- src/core/ext/filters/client_channel/proxy_mapper_registry.cc
|
342
|
-
- src/core/ext/filters/client_channel/proxy_mapper_registry.h
|
343
340
|
- src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc
|
344
341
|
- src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
|
345
342
|
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h
|
@@ -417,6 +414,8 @@ files:
|
|
417
414
|
- src/core/ext/transport/chttp2/transport/chttp2_transport.h
|
418
415
|
- src/core/ext/transport/chttp2/transport/context_list.cc
|
419
416
|
- src/core/ext/transport/chttp2/transport/context_list.h
|
417
|
+
- src/core/ext/transport/chttp2/transport/decode_huff.cc
|
418
|
+
- src/core/ext/transport/chttp2/transport/decode_huff.h
|
420
419
|
- src/core/ext/transport/chttp2/transport/flow_control.cc
|
421
420
|
- src/core/ext/transport/chttp2/transport/flow_control.h
|
422
421
|
- src/core/ext/transport/chttp2/transport/frame.h
|
@@ -1024,9 +1023,6 @@ files:
|
|
1024
1023
|
- src/core/ext/upbdefs-generated/xds/type/matcher/v3/string.upbdefs.h
|
1025
1024
|
- src/core/ext/upbdefs-generated/xds/type/v3/typed_struct.upbdefs.c
|
1026
1025
|
- src/core/ext/upbdefs-generated/xds/type/v3/typed_struct.upbdefs.h
|
1027
|
-
- src/core/ext/xds/certificate_provider_factory.h
|
1028
|
-
- src/core/ext/xds/certificate_provider_registry.cc
|
1029
|
-
- src/core/ext/xds/certificate_provider_registry.h
|
1030
1026
|
- src/core/ext/xds/certificate_provider_store.cc
|
1031
1027
|
- src/core/ext/xds/certificate_provider_store.h
|
1032
1028
|
- src/core/ext/xds/file_watcher_certificate_provider_factory.cc
|
@@ -1036,6 +1032,8 @@ files:
|
|
1036
1032
|
- src/core/ext/xds/xds_api.h
|
1037
1033
|
- src/core/ext/xds/xds_bootstrap.cc
|
1038
1034
|
- src/core/ext/xds/xds_bootstrap.h
|
1035
|
+
- src/core/ext/xds/xds_bootstrap_grpc.cc
|
1036
|
+
- src/core/ext/xds/xds_bootstrap_grpc.h
|
1039
1037
|
- src/core/ext/xds/xds_certificate_provider.cc
|
1040
1038
|
- src/core/ext/xds/xds_certificate_provider.h
|
1041
1039
|
- src/core/ext/xds/xds_channel_args.h
|
@@ -1144,13 +1142,14 @@ files:
|
|
1144
1142
|
- src/core/lib/event_engine/posix_engine/timer_heap.h
|
1145
1143
|
- src/core/lib/event_engine/posix_engine/timer_manager.cc
|
1146
1144
|
- src/core/lib/event_engine/posix_engine/timer_manager.h
|
1147
|
-
- src/core/lib/event_engine/promise.h
|
1148
1145
|
- src/core/lib/event_engine/resolved_address.cc
|
1149
1146
|
- src/core/lib/event_engine/slice.cc
|
1150
1147
|
- src/core/lib/event_engine/slice_buffer.cc
|
1151
1148
|
- src/core/lib/event_engine/socket_notifier.h
|
1152
1149
|
- src/core/lib/event_engine/thread_pool.cc
|
1153
1150
|
- src/core/lib/event_engine/thread_pool.h
|
1151
|
+
- src/core/lib/event_engine/time_util.cc
|
1152
|
+
- src/core/lib/event_engine/time_util.h
|
1154
1153
|
- src/core/lib/event_engine/trace.cc
|
1155
1154
|
- src/core/lib/event_engine/trace.h
|
1156
1155
|
- src/core/lib/event_engine/utils.cc
|
@@ -1161,6 +1160,10 @@ files:
|
|
1161
1160
|
- src/core/lib/event_engine/windows/win_socket.h
|
1162
1161
|
- src/core/lib/event_engine/windows/windows_engine.cc
|
1163
1162
|
- src/core/lib/event_engine/windows/windows_engine.h
|
1163
|
+
- src/core/lib/experiments/config.cc
|
1164
|
+
- src/core/lib/experiments/config.h
|
1165
|
+
- src/core/lib/experiments/experiments.cc
|
1166
|
+
- src/core/lib/experiments/experiments.h
|
1164
1167
|
- src/core/lib/gpr/alloc.cc
|
1165
1168
|
- src/core/lib/gpr/alloc.h
|
1166
1169
|
- src/core/lib/gpr/atm.cc
|
@@ -1168,10 +1171,6 @@ files:
|
|
1168
1171
|
- src/core/lib/gpr/cpu_linux.cc
|
1169
1172
|
- src/core/lib/gpr/cpu_posix.cc
|
1170
1173
|
- src/core/lib/gpr/cpu_windows.cc
|
1171
|
-
- src/core/lib/gpr/env.h
|
1172
|
-
- src/core/lib/gpr/env_linux.cc
|
1173
|
-
- src/core/lib/gpr/env_posix.cc
|
1174
|
-
- src/core/lib/gpr/env_windows.cc
|
1175
1174
|
- src/core/lib/gpr/log.cc
|
1176
1175
|
- src/core/lib/gpr/log_android.cc
|
1177
1176
|
- src/core/lib/gpr/log_linux.cc
|
@@ -1185,7 +1184,6 @@ files:
|
|
1185
1184
|
- src/core/lib/gpr/string_posix.cc
|
1186
1185
|
- src/core/lib/gpr/string_util_windows.cc
|
1187
1186
|
- src/core/lib/gpr/string_windows.cc
|
1188
|
-
- src/core/lib/gpr/string_windows.h
|
1189
1187
|
- src/core/lib/gpr/sync.cc
|
1190
1188
|
- src/core/lib/gpr/sync_abseil.cc
|
1191
1189
|
- src/core/lib/gpr/sync_posix.cc
|
@@ -1209,6 +1207,10 @@ files:
|
|
1209
1207
|
- src/core/lib/gprpp/cpp_impl_of.h
|
1210
1208
|
- src/core/lib/gprpp/debug_location.h
|
1211
1209
|
- src/core/lib/gprpp/dual_ref_counted.h
|
1210
|
+
- src/core/lib/gprpp/env.h
|
1211
|
+
- src/core/lib/gprpp/env_linux.cc
|
1212
|
+
- src/core/lib/gprpp/env_posix.cc
|
1213
|
+
- src/core/lib/gprpp/env_windows.cc
|
1212
1214
|
- src/core/lib/gprpp/examine_stack.cc
|
1213
1215
|
- src/core/lib/gprpp/examine_stack.h
|
1214
1216
|
- src/core/lib/gprpp/fork.cc
|
@@ -1226,11 +1228,14 @@ files:
|
|
1226
1228
|
- src/core/lib/gprpp/mpscq.cc
|
1227
1229
|
- src/core/lib/gprpp/mpscq.h
|
1228
1230
|
- src/core/lib/gprpp/no_destruct.h
|
1231
|
+
- src/core/lib/gprpp/notification.h
|
1229
1232
|
- src/core/lib/gprpp/orphanable.h
|
1230
1233
|
- src/core/lib/gprpp/overload.h
|
1234
|
+
- src/core/lib/gprpp/packed_table.h
|
1231
1235
|
- src/core/lib/gprpp/ref_counted.h
|
1232
1236
|
- src/core/lib/gprpp/ref_counted_ptr.h
|
1233
1237
|
- src/core/lib/gprpp/single_set_ptr.h
|
1238
|
+
- src/core/lib/gprpp/sorted_pack.h
|
1234
1239
|
- src/core/lib/gprpp/stat.h
|
1235
1240
|
- src/core/lib/gprpp/stat_posix.cc
|
1236
1241
|
- src/core/lib/gprpp/stat_windows.cc
|
@@ -1238,6 +1243,8 @@ files:
|
|
1238
1243
|
- src/core/lib/gprpp/status_helper.h
|
1239
1244
|
- src/core/lib/gprpp/sync.h
|
1240
1245
|
- src/core/lib/gprpp/table.h
|
1246
|
+
- src/core/lib/gprpp/tchar.cc
|
1247
|
+
- src/core/lib/gprpp/tchar.h
|
1241
1248
|
- src/core/lib/gprpp/thd.h
|
1242
1249
|
- src/core/lib/gprpp/thd_posix.cc
|
1243
1250
|
- src/core/lib/gprpp/thd_windows.cc
|
@@ -1248,8 +1255,13 @@ files:
|
|
1248
1255
|
- src/core/lib/gprpp/time_util.cc
|
1249
1256
|
- src/core/lib/gprpp/time_util.h
|
1250
1257
|
- src/core/lib/gprpp/unique_type_name.h
|
1258
|
+
- src/core/lib/gprpp/validation_errors.cc
|
1259
|
+
- src/core/lib/gprpp/validation_errors.h
|
1251
1260
|
- src/core/lib/gprpp/work_serializer.cc
|
1252
1261
|
- src/core/lib/gprpp/work_serializer.h
|
1262
|
+
- src/core/lib/handshaker/proxy_mapper.h
|
1263
|
+
- src/core/lib/handshaker/proxy_mapper_registry.cc
|
1264
|
+
- src/core/lib/handshaker/proxy_mapper_registry.h
|
1253
1265
|
- src/core/lib/http/format_request.cc
|
1254
1266
|
- src/core/lib/http/format_request.h
|
1255
1267
|
- src/core/lib/http/httpcli.cc
|
@@ -1407,9 +1419,6 @@ files:
|
|
1407
1419
|
- src/core/lib/load_balancing/subchannel_interface.h
|
1408
1420
|
- src/core/lib/matchers/matchers.cc
|
1409
1421
|
- src/core/lib/matchers/matchers.h
|
1410
|
-
- src/core/lib/profiling/basic_timers.cc
|
1411
|
-
- src/core/lib/profiling/stap_timers.cc
|
1412
|
-
- src/core/lib/profiling/timers.h
|
1413
1422
|
- src/core/lib/promise/activity.cc
|
1414
1423
|
- src/core/lib/promise/activity.h
|
1415
1424
|
- src/core/lib/promise/arena_promise.h
|
@@ -1465,6 +1474,9 @@ files:
|
|
1465
1474
|
- src/core/lib/security/authorization/matchers.h
|
1466
1475
|
- src/core/lib/security/authorization/rbac_policy.cc
|
1467
1476
|
- src/core/lib/security/authorization/rbac_policy.h
|
1477
|
+
- src/core/lib/security/certificate_provider/certificate_provider_factory.h
|
1478
|
+
- src/core/lib/security/certificate_provider/certificate_provider_registry.cc
|
1479
|
+
- src/core/lib/security/certificate_provider/certificate_provider_registry.h
|
1468
1480
|
- src/core/lib/security/context/security_context.cc
|
1469
1481
|
- src/core/lib/security/context/security_context.h
|
1470
1482
|
- src/core/lib/security/credentials/alts/alts_credentials.cc
|
@@ -1614,6 +1626,8 @@ files:
|
|
1614
1626
|
- src/core/lib/surface/event_string.h
|
1615
1627
|
- src/core/lib/surface/init.cc
|
1616
1628
|
- src/core/lib/surface/init.h
|
1629
|
+
- src/core/lib/surface/init_internally.cc
|
1630
|
+
- src/core/lib/surface/init_internally.h
|
1617
1631
|
- src/core/lib/surface/lame_client.cc
|
1618
1632
|
- src/core/lib/surface/lame_client.h
|
1619
1633
|
- src/core/lib/surface/metadata_array.cc
|
@@ -2876,9 +2890,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2876
2890
|
version: 3.2.dev
|
2877
2891
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2878
2892
|
requirements:
|
2879
|
-
- - "
|
2893
|
+
- - ">"
|
2880
2894
|
- !ruby/object:Gem::Version
|
2881
|
-
version:
|
2895
|
+
version: 1.3.1
|
2882
2896
|
requirements: []
|
2883
2897
|
rubygems_version: 3.3.4
|
2884
2898
|
signing_key:
|
@@ -1,56 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
*
|
3
|
-
* Copyright 2017 gRPC authors.
|
4
|
-
*
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
* you may not use this file except in compliance with the License.
|
7
|
-
* You may obtain a copy of the License at
|
8
|
-
*
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
*
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
* See the License for the specific language governing permissions and
|
15
|
-
* limitations under the License.
|
16
|
-
*
|
17
|
-
*/
|
18
|
-
|
19
|
-
#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_REGISTRY_H
|
20
|
-
#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_REGISTRY_H
|
21
|
-
|
22
|
-
#include <grpc/support/port_platform.h>
|
23
|
-
|
24
|
-
#include <memory>
|
25
|
-
#include <string>
|
26
|
-
|
27
|
-
#include "absl/strings/string_view.h"
|
28
|
-
#include "absl/types/optional.h"
|
29
|
-
|
30
|
-
#include "src/core/ext/filters/client_channel/proxy_mapper.h"
|
31
|
-
#include "src/core/lib/channel/channel_args.h"
|
32
|
-
#include "src/core/lib/iomgr/resolved_address.h"
|
33
|
-
|
34
|
-
namespace grpc_core {
|
35
|
-
|
36
|
-
class ProxyMapperRegistry {
|
37
|
-
public:
|
38
|
-
static void Init();
|
39
|
-
static void Shutdown();
|
40
|
-
|
41
|
-
/// Registers a new proxy mapper.
|
42
|
-
/// If \a at_start is true, the new mapper will be at the beginning of
|
43
|
-
/// the list. Otherwise, it will be added to the end.
|
44
|
-
static void Register(bool at_start,
|
45
|
-
std::unique_ptr<ProxyMapperInterface> mapper);
|
46
|
-
|
47
|
-
static absl::optional<std::string> MapName(absl::string_view server_uri,
|
48
|
-
ChannelArgs* args);
|
49
|
-
|
50
|
-
static absl::optional<grpc_resolved_address> MapAddress(
|
51
|
-
const grpc_resolved_address& address, ChannelArgs* args);
|
52
|
-
};
|
53
|
-
|
54
|
-
} // namespace grpc_core
|
55
|
-
|
56
|
-
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_REGISTRY_H */
|
@@ -1,103 +0,0 @@
|
|
1
|
-
//
|
2
|
-
//
|
3
|
-
// Copyright 2020 gRPC authors.
|
4
|
-
//
|
5
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
// you may not use this file except in compliance with the License.
|
7
|
-
// You may obtain a copy of the License at
|
8
|
-
//
|
9
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
//
|
11
|
-
// Unless required by applicable law or agreed to in writing, software
|
12
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
// See the License for the specific language governing permissions and
|
15
|
-
// limitations under the License.
|
16
|
-
//
|
17
|
-
//
|
18
|
-
|
19
|
-
#include <grpc/support/port_platform.h>
|
20
|
-
|
21
|
-
#include "src/core/ext/xds/certificate_provider_registry.h"
|
22
|
-
|
23
|
-
#include <string.h>
|
24
|
-
|
25
|
-
#include <algorithm>
|
26
|
-
#include <utility>
|
27
|
-
#include <vector>
|
28
|
-
|
29
|
-
#include <grpc/support/log.h>
|
30
|
-
|
31
|
-
namespace grpc_core {
|
32
|
-
|
33
|
-
namespace {
|
34
|
-
|
35
|
-
class RegistryState {
|
36
|
-
public:
|
37
|
-
void RegisterCertificateProviderFactory(
|
38
|
-
std::unique_ptr<CertificateProviderFactory> factory) {
|
39
|
-
gpr_log(GPR_DEBUG, "registering certificate provider factory for \"%s\"",
|
40
|
-
factory->name());
|
41
|
-
for (size_t i = 0; i < factories_.size(); ++i) {
|
42
|
-
GPR_ASSERT(strcmp(factories_[i]->name(), factory->name()) != 0);
|
43
|
-
}
|
44
|
-
factories_.push_back(std::move(factory));
|
45
|
-
}
|
46
|
-
|
47
|
-
CertificateProviderFactory* LookupCertificateProviderFactory(
|
48
|
-
absl::string_view name) const {
|
49
|
-
for (size_t i = 0; i < factories_.size(); ++i) {
|
50
|
-
if (name == factories_[i]->name()) {
|
51
|
-
return factories_[i].get();
|
52
|
-
}
|
53
|
-
}
|
54
|
-
return nullptr;
|
55
|
-
}
|
56
|
-
|
57
|
-
private:
|
58
|
-
std::vector<std::unique_ptr<CertificateProviderFactory>> factories_;
|
59
|
-
};
|
60
|
-
|
61
|
-
RegistryState* g_state = nullptr;
|
62
|
-
|
63
|
-
} // namespace
|
64
|
-
|
65
|
-
//
|
66
|
-
// CertificateProviderRegistry
|
67
|
-
//
|
68
|
-
|
69
|
-
CertificateProviderFactory*
|
70
|
-
CertificateProviderRegistry::LookupCertificateProviderFactory(
|
71
|
-
absl::string_view name) {
|
72
|
-
GPR_ASSERT(g_state != nullptr);
|
73
|
-
return g_state->LookupCertificateProviderFactory(name);
|
74
|
-
}
|
75
|
-
|
76
|
-
void CertificateProviderRegistry::InitRegistry() {
|
77
|
-
if (g_state == nullptr) g_state = new RegistryState();
|
78
|
-
}
|
79
|
-
|
80
|
-
void CertificateProviderRegistry::ShutdownRegistry() {
|
81
|
-
delete g_state;
|
82
|
-
g_state = nullptr;
|
83
|
-
}
|
84
|
-
|
85
|
-
void CertificateProviderRegistry::RegisterCertificateProviderFactory(
|
86
|
-
std::unique_ptr<CertificateProviderFactory> factory) {
|
87
|
-
InitRegistry();
|
88
|
-
g_state->RegisterCertificateProviderFactory(std::move(factory));
|
89
|
-
}
|
90
|
-
|
91
|
-
} // namespace grpc_core
|
92
|
-
|
93
|
-
//
|
94
|
-
// Plugin registration
|
95
|
-
//
|
96
|
-
|
97
|
-
void grpc_certificate_provider_registry_init() {
|
98
|
-
grpc_core::CertificateProviderRegistry::InitRegistry();
|
99
|
-
}
|
100
|
-
|
101
|
-
void grpc_certificate_provider_registry_shutdown() {
|
102
|
-
grpc_core::CertificateProviderRegistry::ShutdownRegistry();
|
103
|
-
}
|
@@ -1,59 +0,0 @@
|
|
1
|
-
//
|
2
|
-
//
|
3
|
-
// Copyright 2020 gRPC authors.
|
4
|
-
//
|
5
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
// you may not use this file except in compliance with the License.
|
7
|
-
// You may obtain a copy of the License at
|
8
|
-
//
|
9
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
//
|
11
|
-
// Unless required by applicable law or agreed to in writing, software
|
12
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
// See the License for the specific language governing permissions and
|
15
|
-
// limitations under the License.
|
16
|
-
//
|
17
|
-
//
|
18
|
-
|
19
|
-
#ifndef GRPC_CORE_EXT_XDS_CERTIFICATE_PROVIDER_REGISTRY_H
|
20
|
-
#define GRPC_CORE_EXT_XDS_CERTIFICATE_PROVIDER_REGISTRY_H
|
21
|
-
|
22
|
-
#include <grpc/support/port_platform.h>
|
23
|
-
|
24
|
-
#include <memory>
|
25
|
-
|
26
|
-
#include "absl/strings/string_view.h"
|
27
|
-
|
28
|
-
#include "src/core/ext/xds/certificate_provider_factory.h"
|
29
|
-
|
30
|
-
namespace grpc_core {
|
31
|
-
|
32
|
-
// Global registry for all the certificate provider plugins.
|
33
|
-
class CertificateProviderRegistry {
|
34
|
-
public:
|
35
|
-
// Returns the factory for the plugin keyed by name.
|
36
|
-
static CertificateProviderFactory* LookupCertificateProviderFactory(
|
37
|
-
absl::string_view name);
|
38
|
-
|
39
|
-
// The following methods are used to create and populate the
|
40
|
-
// CertificateProviderRegistry. NOT THREAD SAFE -- to be used only during
|
41
|
-
// global gRPC initialization and shutdown.
|
42
|
-
|
43
|
-
// Global initialization of the registry.
|
44
|
-
static void InitRegistry();
|
45
|
-
|
46
|
-
// Global shutdown of the registry.
|
47
|
-
static void ShutdownRegistry();
|
48
|
-
|
49
|
-
// Register a provider with the registry. Can only be called after calling
|
50
|
-
// InitRegistry(). The key of the factory is extracted from factory
|
51
|
-
// parameter with method CertificateProviderFactory::name. If the same key
|
52
|
-
// is registered twice, an exception is raised.
|
53
|
-
static void RegisterCertificateProviderFactory(
|
54
|
-
std::unique_ptr<CertificateProviderFactory> factory);
|
55
|
-
};
|
56
|
-
|
57
|
-
} // namespace grpc_core
|
58
|
-
|
59
|
-
#endif // GRPC_CORE_EXT_XDS_CERTIFICATE_PROVIDER_REGISTRY_H
|