grpc 1.82.0 → 1.83.0.pre1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Makefile +8 -5
- data/etc/roots.pem +10400 -3855
- data/include/grpc/grpc_audit_logging.h +2 -2
- data/include/grpc/grpc_security_constants.h +2 -0
- data/include/grpc/impl/channel_arg_names.h +23 -0
- data/src/core/call/call_filters.h +19 -3
- data/src/core/call/call_spine.h +4 -4
- data/src/core/call/client_call.cc +1 -1
- data/src/core/call/metadata.cc +7 -2
- data/src/core/call/server_call.cc +13 -3
- data/src/core/call/server_call.h +5 -3
- data/src/core/client_channel/backup_poller.cc +2 -17
- data/src/core/client_channel/client_channel.cc +17 -14
- data/src/core/client_channel/client_channel.h +3 -1
- data/src/core/client_channel/client_channel_filter.cc +11 -13
- data/src/core/client_channel/client_channel_service_config.cc +5 -13
- data/src/core/client_channel/direct_channel.cc +5 -1
- data/src/core/client_channel/direct_channel.h +3 -1
- data/src/core/config/experiment_env_var.cc +30 -0
- data/src/core/config/experiment_env_var.h +26 -0
- data/src/core/credentials/call/regional_access_boundary_fetcher.cc +6 -6
- data/src/core/credentials/transport/ssl/ssl_security_connector.cc +14 -2
- data/src/core/credentials/transport/tls/grpc_tls_certificate_selector.cc +172 -0
- data/src/core/credentials/transport/tls/grpc_tls_certificate_selector.h +103 -0
- data/src/core/credentials/transport/tls/load_system_roots_fallback.cc +3 -2
- data/src/core/credentials/transport/tls/load_system_roots_supported.cc +10 -3
- data/src/core/credentials/transport/tls/tls_security_connector.cc +14 -2
- data/src/core/credentials/transport/xds/xds_credentials.cc +4 -12
- data/src/core/ext/filters/rbac/rbac_service_config_parser.cc +2 -1
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +19 -13
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +11 -9
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/flow_control.h +3 -2
- data/src/core/ext/transport/chttp2/transport/frame.cc +58 -1
- data/src/core/ext/transport/chttp2/transport/frame.h +13 -1
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +2 -4
- data/src/core/ext/transport/chttp2/transport/frame_security.cc +10 -1
- data/src/core/ext/transport/chttp2/transport/frame_security.h +2 -1
- data/src/core/ext/transport/chttp2/transport/goaway.cc +11 -1
- data/src/core/ext/transport/chttp2/transport/goaway.h +17 -1
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +9 -0
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.cc +117 -276
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.h +44 -17
- data/src/core/ext/transport/chttp2/transport/http2_server_transport.cc +382 -496
- data/src/core/ext/transport/chttp2/transport/http2_server_transport.h +75 -77
- data/src/core/ext/transport/chttp2/transport/http2_settings.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +30 -11
- data/src/core/ext/transport/chttp2/transport/http2_settings_promises.h +24 -9
- data/src/core/ext/transport/chttp2/transport/http2_transport.cc +26 -0
- data/src/core/ext/transport/chttp2/transport/http2_transport.h +2 -0
- data/src/core/ext/transport/chttp2/transport/internal.h +4 -0
- data/src/core/ext/transport/chttp2/transport/parsing.cc +3 -2
- data/src/core/ext/transport/chttp2/transport/ping_promise.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc +4 -10
- data/src/core/ext/transport/chttp2/transport/read_context.h +62 -20
- data/src/core/ext/transport/chttp2/transport/security_frame.h +1 -0
- data/src/core/ext/transport/chttp2/transport/stream.h +271 -120
- data/src/core/ext/transport/chttp2/transport/stream_data_queue.h +77 -61
- data/src/core/handshaker/security/secure_endpoint.cc +0 -13
- data/src/core/lib/channel/promise_based_filter.cc +77 -3
- data/src/core/lib/channel/promise_based_filter.h +238 -184
- data/src/core/lib/event_engine/extensions/receive_coalescing_extension.h +0 -4
- data/src/core/lib/event_engine/extensions/tcp_trace.h +1 -1
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +2 -12
- data/src/core/lib/event_engine/shim.cc +2 -16
- data/src/core/lib/event_engine/shim.h +0 -4
- data/src/core/lib/experiments/experiments.cc +51 -102
- data/src/core/lib/experiments/experiments.h +37 -59
- data/src/core/lib/iomgr/error.cc +3 -73
- data/src/core/lib/iomgr/error.h +8 -6
- data/src/core/lib/iomgr/error_cfstream.cc +1 -2
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +2 -6
- data/src/core/lib/iomgr/ev_poll_posix.cc +2 -6
- data/src/core/lib/iomgr/tcp_posix.cc +2 -6
- data/src/core/lib/security/authorization/audit_logging.cc +2 -2
- data/src/core/lib/security/authorization/audit_logging.h +3 -3
- data/src/core/lib/security/authorization/grpc_authorization_engine.cc +11 -13
- data/src/core/lib/security/authorization/grpc_authorization_engine.h +1 -1
- data/src/core/lib/security/authorization/matchers.cc +20 -20
- data/src/core/lib/security/authorization/matchers.h +15 -16
- data/src/core/lib/security/authorization/rbac_policy.h +1 -1
- data/src/core/lib/security/authorization/stdout_logger.cc +3 -3
- data/src/core/lib/security/authorization/stdout_logger.h +6 -5
- data/src/core/lib/surface/call.cc +0 -8
- data/src/core/lib/surface/call.h +2 -0
- data/src/core/lib/surface/channel.cc +21 -2
- data/src/core/lib/surface/channel.h +14 -6
- data/src/core/lib/surface/filter_stack_call.cc +10 -29
- data/src/core/lib/surface/legacy_channel.cc +7 -7
- data/src/core/lib/surface/legacy_channel.h +3 -1
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/bdp_estimator.cc +13 -13
- data/src/core/lib/transport/bdp_estimator.h +9 -5
- data/src/core/lib/transport/error_utils.cc +26 -138
- data/src/core/lib/transport/promise_endpoint.h +2 -4
- data/src/core/load_balancing/grpclb/grpclb.cc +2 -1
- data/src/core/load_balancing/pick_first/pick_first.cc +33 -2
- data/src/core/load_balancing/pick_first/pick_first.h +6 -0
- data/src/core/load_balancing/ring_hash/ring_hash.cc +3 -10
- data/src/core/load_balancing/rls/rls.cc +2 -1
- data/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc +2 -7
- data/src/core/load_balancing/xds/cds.cc +80 -56
- data/src/core/load_balancing/xds/cds.h +21 -0
- data/src/core/mitigation_engine/mitigation.h +53 -0
- data/src/core/mitigation_engine/mitigation_provider.h +62 -0
- data/src/core/resolver/dns/dns_resolver_plugin.cc +1 -6
- data/src/core/resolver/xds/xds_resolver.cc +14 -11
- data/src/core/server/server.h +1 -4
- data/src/core/server/server_config_selector.h +5 -4
- data/src/core/server/server_config_selector_filter.cc +67 -80
- data/src/core/server/xds_server_config_fetcher.cc +681 -692
- data/src/core/server/xds_server_config_fetcher_legacy.cc +15 -12
- data/src/core/telemetry/call_tracer.cc +49 -2
- data/src/core/telemetry/call_tracer.h +1 -0
- data/src/core/telemetry/tcp_tracer.h +38 -0
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +1 -1
- data/src/core/tsi/ssl_telemetry_utils.cc +343 -0
- data/src/core/tsi/ssl_telemetry_utils.h +74 -0
- data/src/core/tsi/ssl_transport_security.cc +577 -301
- data/src/core/tsi/ssl_transport_security.h +22 -6
- data/src/core/tsi/ssl_transport_security_utils.cc +2 -0
- data/src/core/tsi/transport_security.h +7 -0
- data/src/core/util/http_client/httpcli.cc +1 -4
- data/src/core/util/http_client/httpcli_security_connector.cc +2 -1
- data/src/core/util/status_helper.cc +71 -192
- data/src/core/util/status_helper.h +16 -21
- data/src/core/xds/grpc/file_watcher_certificate_provider_factory.cc +2 -11
- data/src/core/xds/grpc/xds_bootstrap_grpc.cc +2 -7
- data/src/core/xds/grpc/xds_cluster_parser.cc +5 -16
- data/src/core/xds/grpc/xds_common_types.cc +94 -38
- data/src/core/xds/grpc/xds_common_types.h +33 -18
- data/src/core/xds/grpc/xds_common_types_parser.cc +168 -100
- data/src/core/xds/grpc/xds_common_types_parser.h +18 -1
- data/src/core/xds/grpc/xds_endpoint_parser.cc +6 -17
- data/src/core/xds/grpc/xds_http_filter_registry.cc +2 -10
- data/src/core/xds/grpc/xds_http_rbac_filter.cc +3 -12
- data/src/core/xds/grpc/xds_metadata_parser.cc +0 -2
- data/src/core/xds/grpc/xds_route_config_parser.cc +7 -11
- data/src/core/xds/grpc/xds_routing.cc +113 -82
- data/src/core/xds/grpc/xds_routing.h +70 -20
- data/src/core/xds/grpc/xds_server_grpc.cc +22 -13
- data/src/core/xds/grpc/xds_server_grpc.h +16 -2
- data/src/core/xds/grpc/xds_server_grpc_interface.h +10 -0
- data/src/core/xds/grpc/xds_transport_grpc.cc +123 -18
- data/src/core/xds/grpc/xds_transport_grpc.h +28 -4
- data/src/core/xds/xds_client/lrs_client.cc +3 -7
- data/src/core/xds/xds_client/xds_bootstrap.cc +4 -16
- data/src/core/xds/xds_client/xds_client.cc +2 -15
- data/src/core/xds/xds_client/xds_transport.h +3 -0
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/pb/src/proto/grpc/testing/messages_pb.rb +1 -1
- metadata +9 -1
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
|
|
20
20
|
#include <set>
|
|
21
21
|
#include <string>
|
|
22
|
+
#include <utility>
|
|
23
|
+
#include <vector>
|
|
22
24
|
|
|
23
25
|
#include "src/core/credentials/call/call_creds_registry.h"
|
|
24
26
|
#include "src/core/credentials/transport/channel_creds_registry.h"
|
|
@@ -26,6 +28,7 @@
|
|
|
26
28
|
#include "src/core/util/json/json_args.h"
|
|
27
29
|
#include "src/core/util/json/json_object_loader.h"
|
|
28
30
|
#include "src/core/util/ref_counted_ptr.h"
|
|
31
|
+
#include "src/core/util/time.h"
|
|
29
32
|
#include "src/core/util/validation_errors.h"
|
|
30
33
|
#include "src/core/xds/grpc/xds_server_grpc_interface.h"
|
|
31
34
|
#include "src/core/xds/xds_client/xds_bootstrap.h"
|
|
@@ -43,10 +46,14 @@ class GrpcXdsServerTarget final : public GrpcXdsServerInterface {
|
|
|
43
46
|
explicit GrpcXdsServerTarget(
|
|
44
47
|
std::string server_uri,
|
|
45
48
|
RefCountedPtr<const ChannelCredsConfig> channel_creds_config,
|
|
46
|
-
std::vector<RefCountedPtr<const CallCredsConfig>> call_creds_configs
|
|
49
|
+
std::vector<RefCountedPtr<const CallCredsConfig>> call_creds_configs,
|
|
50
|
+
std::vector<std::pair<std::string, std::string>> initial_metadata = {},
|
|
51
|
+
Duration timeout = Duration::Infinity())
|
|
47
52
|
: server_uri_(std::move(server_uri)),
|
|
48
53
|
channel_creds_config_(std::move(channel_creds_config)),
|
|
49
|
-
call_creds_configs_(std::move(call_creds_configs))
|
|
54
|
+
call_creds_configs_(std::move(call_creds_configs)),
|
|
55
|
+
initial_metadata_(std::move(initial_metadata)),
|
|
56
|
+
timeout_(timeout) {}
|
|
50
57
|
|
|
51
58
|
bool Equals(const XdsServerTarget& other) const override;
|
|
52
59
|
std::string Key() const override;
|
|
@@ -59,11 +66,18 @@ class GrpcXdsServerTarget final : public GrpcXdsServerInterface {
|
|
|
59
66
|
const override {
|
|
60
67
|
return call_creds_configs_;
|
|
61
68
|
}
|
|
69
|
+
const std::vector<std::pair<std::string, std::string>>& initial_metadata()
|
|
70
|
+
const override {
|
|
71
|
+
return initial_metadata_;
|
|
72
|
+
}
|
|
73
|
+
Duration timeout() const override { return timeout_; }
|
|
62
74
|
|
|
63
75
|
private:
|
|
64
76
|
std::string server_uri_;
|
|
65
77
|
RefCountedPtr<const ChannelCredsConfig> channel_creds_config_;
|
|
66
78
|
std::vector<RefCountedPtr<const CallCredsConfig>> call_creds_configs_;
|
|
79
|
+
std::vector<std::pair<std::string, std::string>> initial_metadata_;
|
|
80
|
+
Duration timeout_;
|
|
67
81
|
};
|
|
68
82
|
|
|
69
83
|
class GrpcXdsServer final : public XdsBootstrap::XdsServer {
|
|
@@ -17,9 +17,14 @@
|
|
|
17
17
|
#ifndef GRPC_SRC_CORE_XDS_GRPC_XDS_SERVER_GRPC_INTERFACE_H
|
|
18
18
|
#define GRPC_SRC_CORE_XDS_GRPC_XDS_SERVER_GRPC_INTERFACE_H
|
|
19
19
|
|
|
20
|
+
#include <string>
|
|
21
|
+
#include <utility>
|
|
22
|
+
#include <vector>
|
|
23
|
+
|
|
20
24
|
#include "src/core/credentials/call/call_creds_registry.h"
|
|
21
25
|
#include "src/core/credentials/transport/channel_creds_registry.h"
|
|
22
26
|
#include "src/core/util/ref_counted_ptr.h"
|
|
27
|
+
#include "src/core/util/time.h"
|
|
23
28
|
#include "src/core/xds/xds_client/xds_bootstrap.h"
|
|
24
29
|
|
|
25
30
|
namespace grpc_core {
|
|
@@ -31,6 +36,11 @@ class GrpcXdsServerInterface : public XdsBootstrap::XdsServerTarget {
|
|
|
31
36
|
|
|
32
37
|
virtual const std::vector<RefCountedPtr<const CallCredsConfig>>&
|
|
33
38
|
call_creds_configs() const = 0;
|
|
39
|
+
|
|
40
|
+
virtual const std::vector<std::pair<std::string, std::string>>&
|
|
41
|
+
initial_metadata() const = 0;
|
|
42
|
+
|
|
43
|
+
virtual Duration timeout() const = 0;
|
|
34
44
|
};
|
|
35
45
|
|
|
36
46
|
} // namespace grpc_core
|
|
@@ -28,8 +28,11 @@
|
|
|
28
28
|
|
|
29
29
|
#include <functional>
|
|
30
30
|
#include <memory>
|
|
31
|
+
#include <optional>
|
|
32
|
+
#include <string>
|
|
31
33
|
#include <string_view>
|
|
32
34
|
#include <utility>
|
|
35
|
+
#include <vector>
|
|
33
36
|
|
|
34
37
|
#include "src/core/client_channel/client_channel_filter.h"
|
|
35
38
|
#include "src/core/config/core_configuration.h"
|
|
@@ -43,6 +46,7 @@
|
|
|
43
46
|
#include "src/core/lib/debug/trace.h"
|
|
44
47
|
#include "src/core/lib/event_engine/default_event_engine.h"
|
|
45
48
|
#include "src/core/lib/iomgr/closure.h"
|
|
49
|
+
#include "src/core/lib/iomgr/error.h"
|
|
46
50
|
#include "src/core/lib/iomgr/exec_ctx.h"
|
|
47
51
|
#include "src/core/lib/iomgr/pollset_set.h"
|
|
48
52
|
#include "src/core/lib/slice/slice.h"
|
|
@@ -56,7 +60,9 @@
|
|
|
56
60
|
#include "src/core/util/down_cast.h"
|
|
57
61
|
#include "src/core/util/grpc_check.h"
|
|
58
62
|
#include "src/core/util/orphanable.h"
|
|
63
|
+
#include "src/core/util/ref_counted.h"
|
|
59
64
|
#include "src/core/util/ref_counted_ptr.h"
|
|
65
|
+
#include "src/core/util/sync.h"
|
|
60
66
|
#include "src/core/util/time.h"
|
|
61
67
|
#include "src/core/xds/grpc/xds_server_grpc_interface.h"
|
|
62
68
|
#include "src/core/xds/xds_client/xds_bootstrap.h"
|
|
@@ -71,28 +77,43 @@ namespace grpc_core {
|
|
|
71
77
|
GrpcXdsTransportFactory::GrpcXdsTransport::GrpcStreamingCall::GrpcStreamingCall(
|
|
72
78
|
WeakRefCountedPtr<GrpcXdsTransportFactory> factory, Channel* channel,
|
|
73
79
|
const char* method,
|
|
74
|
-
std::unique_ptr<StreamingCall::EventHandler> event_handler
|
|
80
|
+
std::unique_ptr<StreamingCall::EventHandler> event_handler,
|
|
81
|
+
const std::vector<std::pair<std::string, std::string>>& initial_metadata,
|
|
82
|
+
Duration timeout)
|
|
75
83
|
: factory_(std::move(factory)), event_handler_(std::move(event_handler)) {
|
|
84
|
+
Timestamp deadline = (timeout == Duration::Infinity())
|
|
85
|
+
? Timestamp::InfFuture()
|
|
86
|
+
: Timestamp::Now() + timeout;
|
|
76
87
|
// Create call.
|
|
77
88
|
call_ = channel->CreateCall(
|
|
78
89
|
/*parent_call=*/nullptr, GRPC_PROPAGATE_DEFAULTS, /*cq=*/nullptr,
|
|
79
90
|
factory_->interested_parties(), Slice::FromStaticString(method),
|
|
80
|
-
/*authority=*/std::nullopt,
|
|
81
|
-
/*registered_method=*/true);
|
|
91
|
+
/*authority=*/std::nullopt, deadline,
|
|
92
|
+
/*registered_method=*/true, /*arena_init_function=*/std::nullopt);
|
|
82
93
|
GRPC_CHECK_NE(call_, nullptr);
|
|
83
94
|
// Init data associated with the call.
|
|
84
95
|
grpc_metadata_array_init(&initial_metadata_recv_);
|
|
85
96
|
grpc_metadata_array_init(&trailing_metadata_recv_);
|
|
86
97
|
// Initialize closure to be used for sending messages.
|
|
87
98
|
GRPC_CLOSURE_INIT(&on_request_sent_, OnRequestSent, this, nullptr);
|
|
99
|
+
GRPC_CLOSURE_INIT(&on_half_closed_, OnHalfClosed, this, nullptr);
|
|
88
100
|
// Start ops on the call.
|
|
89
101
|
grpc_call_error call_error;
|
|
90
102
|
grpc_op ops[2];
|
|
91
103
|
memset(ops, 0, sizeof(ops));
|
|
92
104
|
// Send initial metadata.
|
|
105
|
+
send_initial_metadata_.resize(initial_metadata.size());
|
|
106
|
+
for (size_t i = 0; i < initial_metadata.size(); ++i) {
|
|
107
|
+
send_initial_metadata_[i].key =
|
|
108
|
+
grpc_slice_from_cpp_string(initial_metadata[i].first);
|
|
109
|
+
send_initial_metadata_[i].value =
|
|
110
|
+
grpc_slice_from_cpp_string(initial_metadata[i].second);
|
|
111
|
+
}
|
|
93
112
|
grpc_op* op = ops;
|
|
94
113
|
op->op = GRPC_OP_SEND_INITIAL_METADATA;
|
|
95
|
-
op->data.send_initial_metadata.count =
|
|
114
|
+
op->data.send_initial_metadata.count = send_initial_metadata_.size();
|
|
115
|
+
op->data.send_initial_metadata.metadata =
|
|
116
|
+
send_initial_metadata_.empty() ? nullptr : send_initial_metadata_.data();
|
|
96
117
|
op->flags = GRPC_INITIAL_METADATA_WAIT_FOR_READY |
|
|
97
118
|
GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET;
|
|
98
119
|
op->reserved = nullptr;
|
|
@@ -136,6 +157,10 @@ GrpcXdsTransportFactory::GrpcXdsTransport::GrpcStreamingCall::
|
|
|
136
157
|
grpc_byte_buffer_destroy(send_message_payload_);
|
|
137
158
|
grpc_byte_buffer_destroy(recv_message_payload_);
|
|
138
159
|
CSliceUnref(status_details_);
|
|
160
|
+
for (auto& md : send_initial_metadata_) {
|
|
161
|
+
CSliceUnref(md.key);
|
|
162
|
+
CSliceUnref(md.value);
|
|
163
|
+
}
|
|
139
164
|
GRPC_CHECK_NE(call_, nullptr);
|
|
140
165
|
grpc_call_unref(call_);
|
|
141
166
|
}
|
|
@@ -181,6 +206,18 @@ void GrpcXdsTransportFactory::GrpcXdsTransport::GrpcStreamingCall::
|
|
|
181
206
|
GRPC_CHECK_EQ(call_error, GRPC_CALL_OK);
|
|
182
207
|
}
|
|
183
208
|
|
|
209
|
+
void GrpcXdsTransportFactory::GrpcXdsTransport::GrpcStreamingCall::
|
|
210
|
+
SendHalfClose() {
|
|
211
|
+
Ref(DEBUG_LOCATION, "SendHalfClose").release();
|
|
212
|
+
grpc_op op;
|
|
213
|
+
memset(&op, 0, sizeof(op));
|
|
214
|
+
op.op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
|
|
215
|
+
GRPC_CHECK_NE(call_, nullptr);
|
|
216
|
+
const grpc_call_error call_error =
|
|
217
|
+
grpc_call_start_batch_and_execute(call_, &op, 1, &on_half_closed_);
|
|
218
|
+
GRPC_CHECK_EQ(call_error, GRPC_CALL_OK);
|
|
219
|
+
}
|
|
220
|
+
|
|
184
221
|
void GrpcXdsTransportFactory::GrpcXdsTransport::GrpcStreamingCall::
|
|
185
222
|
OnRecvInitialMetadata(void* arg, grpc_error_handle /*error*/) {
|
|
186
223
|
RefCountedPtr<GrpcStreamingCall> self(static_cast<GrpcStreamingCall*>(arg));
|
|
@@ -197,6 +234,11 @@ void GrpcXdsTransportFactory::GrpcXdsTransport::GrpcStreamingCall::
|
|
|
197
234
|
self->event_handler_->OnRequestSent(error.ok());
|
|
198
235
|
}
|
|
199
236
|
|
|
237
|
+
void GrpcXdsTransportFactory::GrpcXdsTransport::GrpcStreamingCall::OnHalfClosed(
|
|
238
|
+
void* arg, grpc_error_handle /*error*/) {
|
|
239
|
+
RefCountedPtr<GrpcStreamingCall> self(static_cast<GrpcStreamingCall*>(arg));
|
|
240
|
+
}
|
|
241
|
+
|
|
200
242
|
void GrpcXdsTransportFactory::GrpcXdsTransport::GrpcStreamingCall::
|
|
201
243
|
OnResponseReceived(void* arg, grpc_error_handle /*error*/) {
|
|
202
244
|
RefCountedPtr<GrpcStreamingCall> self(static_cast<GrpcStreamingCall*>(arg));
|
|
@@ -279,23 +321,66 @@ RefCountedPtr<Channel> CreateXdsChannel(
|
|
|
279
321
|
server.server_uri().c_str(), channel_creds.get(), args.ToC().get())));
|
|
280
322
|
}
|
|
281
323
|
|
|
324
|
+
std::string GetChannelKey(const GrpcXdsServerInterface& server) {
|
|
325
|
+
std::string result = "{server_uri=";
|
|
326
|
+
absl::StrAppend(&result, server.server_uri());
|
|
327
|
+
if (server.channel_creds_config() != nullptr) {
|
|
328
|
+
absl::StrAppend(
|
|
329
|
+
&result,
|
|
330
|
+
", channel_creds={type=", server.channel_creds_config()->type(),
|
|
331
|
+
", config=", server.channel_creds_config()->ToString(), "}");
|
|
332
|
+
}
|
|
333
|
+
for (const auto& call_creds_config : server.call_creds_configs()) {
|
|
334
|
+
absl::StrAppend(&result, ", call_creds={type=", call_creds_config->type(),
|
|
335
|
+
", config=", call_creds_config->ToString(), "}");
|
|
336
|
+
}
|
|
337
|
+
absl::StrAppend(&result, "}");
|
|
338
|
+
return result;
|
|
339
|
+
}
|
|
340
|
+
|
|
282
341
|
} // namespace
|
|
283
342
|
|
|
343
|
+
class GrpcXdsTransportFactory::SharedChannel final
|
|
344
|
+
: public RefCounted<SharedChannel> {
|
|
345
|
+
public:
|
|
346
|
+
SharedChannel(std::string key, RefCountedPtr<Channel> channel,
|
|
347
|
+
WeakRefCountedPtr<GrpcXdsTransportFactory> factory)
|
|
348
|
+
: key_(std::move(key)),
|
|
349
|
+
channel_(std::move(channel)),
|
|
350
|
+
factory_(std::move(factory)) {}
|
|
351
|
+
|
|
352
|
+
~SharedChannel() override {
|
|
353
|
+
MutexLock lock(&factory_->mu_);
|
|
354
|
+
auto it = factory_->channels_.find(key_);
|
|
355
|
+
if (it != factory_->channels_.end() && it->second == this) {
|
|
356
|
+
factory_->channels_.erase(it);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
Channel* channel() const { return channel_.get(); }
|
|
361
|
+
|
|
362
|
+
private:
|
|
363
|
+
std::string key_;
|
|
364
|
+
RefCountedPtr<Channel> channel_;
|
|
365
|
+
WeakRefCountedPtr<GrpcXdsTransportFactory> factory_;
|
|
366
|
+
};
|
|
367
|
+
|
|
284
368
|
GrpcXdsTransportFactory::GrpcXdsTransport::GrpcXdsTransport(
|
|
285
369
|
WeakRefCountedPtr<GrpcXdsTransportFactory> factory,
|
|
370
|
+
RefCountedPtr<SharedChannel> channel,
|
|
286
371
|
const XdsBootstrap::XdsServerTarget& server, absl::Status* status)
|
|
287
372
|
: XdsTransport(GRPC_TRACE_FLAG_ENABLED(xds_client_refcount)
|
|
288
373
|
? "GrpcXdsTransport"
|
|
289
374
|
: nullptr),
|
|
290
375
|
factory_(std::move(factory)),
|
|
291
|
-
key_(server.Key())
|
|
376
|
+
key_(server.Key()),
|
|
377
|
+
channel_(std::move(channel)) {
|
|
292
378
|
GRPC_TRACE_LOG(xds_client, INFO)
|
|
293
379
|
<< "[GrpcXdsTransport " << this << "] created";
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
if (channel_->IsLame()) {
|
|
380
|
+
const auto& grpc_server = DownCast<const GrpcXdsServerInterface&>(server);
|
|
381
|
+
initial_metadata_ = grpc_server.initial_metadata();
|
|
382
|
+
timeout_ = grpc_server.timeout();
|
|
383
|
+
if (channel_->channel()->IsLame()) {
|
|
299
384
|
*status = absl::UnavailableError("xds client has a lame channel");
|
|
300
385
|
}
|
|
301
386
|
}
|
|
@@ -327,20 +412,20 @@ void GrpcXdsTransportFactory::GrpcXdsTransport::Orphaned() {
|
|
|
327
412
|
|
|
328
413
|
void GrpcXdsTransportFactory::GrpcXdsTransport::StartConnectivityFailureWatch(
|
|
329
414
|
RefCountedPtr<ConnectivityFailureWatcher> watcher) {
|
|
330
|
-
if (channel_->IsLame()) return;
|
|
415
|
+
if (channel_->channel()->IsLame()) return;
|
|
331
416
|
auto* state_watcher = new StateWatcher(watcher);
|
|
332
417
|
{
|
|
333
418
|
MutexLock lock(&mu_);
|
|
334
419
|
watchers_.emplace(watcher, state_watcher);
|
|
335
420
|
}
|
|
336
|
-
channel_->AddConnectivityWatcher(
|
|
421
|
+
channel_->channel()->AddConnectivityWatcher(
|
|
337
422
|
GRPC_CHANNEL_IDLE,
|
|
338
423
|
OrphanablePtr<AsyncConnectivityStateWatcherInterface>(state_watcher));
|
|
339
424
|
}
|
|
340
425
|
|
|
341
426
|
void GrpcXdsTransportFactory::GrpcXdsTransport::StopConnectivityFailureWatch(
|
|
342
427
|
const RefCountedPtr<ConnectivityFailureWatcher>& watcher) {
|
|
343
|
-
if (channel_->IsLame()) return;
|
|
428
|
+
if (channel_->channel()->IsLame()) return;
|
|
344
429
|
StateWatcher* state_watcher = nullptr;
|
|
345
430
|
{
|
|
346
431
|
MutexLock lock(&mu_);
|
|
@@ -349,7 +434,7 @@ void GrpcXdsTransportFactory::GrpcXdsTransport::StopConnectivityFailureWatch(
|
|
|
349
434
|
state_watcher = it->second;
|
|
350
435
|
watchers_.erase(it);
|
|
351
436
|
}
|
|
352
|
-
channel_->RemoveConnectivityWatcher(state_watcher);
|
|
437
|
+
channel_->channel()->RemoveConnectivityWatcher(state_watcher);
|
|
353
438
|
}
|
|
354
439
|
|
|
355
440
|
OrphanablePtr<XdsTransportFactory::XdsTransport::StreamingCall>
|
|
@@ -357,12 +442,16 @@ GrpcXdsTransportFactory::GrpcXdsTransport::CreateStreamingCall(
|
|
|
357
442
|
const char* method,
|
|
358
443
|
std::unique_ptr<StreamingCall::EventHandler> event_handler) {
|
|
359
444
|
return MakeOrphanable<GrpcStreamingCall>(
|
|
360
|
-
factory_.WeakRef(DEBUG_LOCATION, "StreamingCall"), channel_
|
|
361
|
-
std::move(event_handler));
|
|
445
|
+
factory_.WeakRef(DEBUG_LOCATION, "StreamingCall"), channel_->channel(),
|
|
446
|
+
method, std::move(event_handler), initial_metadata_, timeout_);
|
|
362
447
|
}
|
|
363
448
|
|
|
364
449
|
void GrpcXdsTransportFactory::GrpcXdsTransport::ResetBackoff() {
|
|
365
|
-
channel_->ResetConnectionBackoff();
|
|
450
|
+
channel_->channel()->ResetConnectionBackoff();
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
Channel* GrpcXdsTransportFactory::GrpcXdsTransport::channel() const {
|
|
454
|
+
return channel_->channel();
|
|
366
455
|
}
|
|
367
456
|
|
|
368
457
|
//
|
|
@@ -406,8 +495,24 @@ GrpcXdsTransportFactory::GetTransport(
|
|
|
406
495
|
transport = it->second->RefIfNonZero().TakeAsSubclass<GrpcXdsTransport>();
|
|
407
496
|
}
|
|
408
497
|
if (transport == nullptr) {
|
|
498
|
+
const auto& grpc_server = DownCast<const GrpcXdsServerInterface&>(server);
|
|
499
|
+
std::string channel_key = GetChannelKey(grpc_server);
|
|
500
|
+
auto channel_it = channels_.find(channel_key);
|
|
501
|
+
RefCountedPtr<SharedChannel> channel;
|
|
502
|
+
if (channel_it != channels_.end()) {
|
|
503
|
+
channel = channel_it->second->Ref();
|
|
504
|
+
} else {
|
|
505
|
+
RefCountedPtr<Channel> raw_channel =
|
|
506
|
+
CreateXdsChannel(args_, *certificate_provider_store_, grpc_server);
|
|
507
|
+
GRPC_CHECK(raw_channel != nullptr);
|
|
508
|
+
channel = MakeRefCounted<SharedChannel>(
|
|
509
|
+
channel_key, std::move(raw_channel),
|
|
510
|
+
WeakRefAsSubclass<GrpcXdsTransportFactory>());
|
|
511
|
+
channels_.emplace(channel_key, channel.get());
|
|
512
|
+
}
|
|
409
513
|
transport = MakeRefCounted<GrpcXdsTransport>(
|
|
410
|
-
WeakRefAsSubclass<GrpcXdsTransportFactory>(),
|
|
514
|
+
WeakRefAsSubclass<GrpcXdsTransportFactory>(), std::move(channel),
|
|
515
|
+
server, status);
|
|
411
516
|
transports_.emplace(std::move(key), transport.get());
|
|
412
517
|
}
|
|
413
518
|
return transport;
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
#include <functional>
|
|
26
26
|
#include <memory>
|
|
27
27
|
#include <string>
|
|
28
|
+
#include <utility>
|
|
29
|
+
#include <vector>
|
|
28
30
|
|
|
29
31
|
#include "src/core/lib/channel/channel_args.h"
|
|
30
32
|
#include "src/core/lib/iomgr/closure.h"
|
|
@@ -34,6 +36,7 @@
|
|
|
34
36
|
#include "src/core/util/orphanable.h"
|
|
35
37
|
#include "src/core/util/ref_counted_ptr.h"
|
|
36
38
|
#include "src/core/util/sync.h"
|
|
39
|
+
#include "src/core/util/time.h"
|
|
37
40
|
#include "src/core/xds/grpc/certificate_provider_store_interface.h"
|
|
38
41
|
#include "src/core/xds/xds_client/xds_bootstrap.h"
|
|
39
42
|
#include "src/core/xds/xds_client/xds_transport.h"
|
|
@@ -60,6 +63,8 @@ class GrpcXdsTransportFactory final : public XdsTransportFactory {
|
|
|
60
63
|
grpc_pollset_set* interested_parties() const { return interested_parties_; }
|
|
61
64
|
|
|
62
65
|
private:
|
|
66
|
+
class SharedChannel;
|
|
67
|
+
|
|
63
68
|
ChannelArgs args_;
|
|
64
69
|
RefCountedPtr<CertificateProviderStoreInterface> certificate_provider_store_;
|
|
65
70
|
grpc_pollset_set* interested_parties_;
|
|
@@ -67,6 +72,8 @@ class GrpcXdsTransportFactory final : public XdsTransportFactory {
|
|
|
67
72
|
Mutex mu_;
|
|
68
73
|
absl::flat_hash_map<std::string /*XdsServerTarget key*/, GrpcXdsTransport*>
|
|
69
74
|
transports_ ABSL_GUARDED_BY(&mu_);
|
|
75
|
+
absl::flat_hash_map<std::string /*Channel key*/, SharedChannel*> channels_
|
|
76
|
+
ABSL_GUARDED_BY(&mu_);
|
|
70
77
|
};
|
|
71
78
|
|
|
72
79
|
class GrpcXdsTransportFactory::GrpcXdsTransport final
|
|
@@ -75,6 +82,7 @@ class GrpcXdsTransportFactory::GrpcXdsTransport final
|
|
|
75
82
|
class GrpcStreamingCall;
|
|
76
83
|
|
|
77
84
|
GrpcXdsTransport(WeakRefCountedPtr<GrpcXdsTransportFactory> factory,
|
|
85
|
+
RefCountedPtr<SharedChannel> channel,
|
|
78
86
|
const XdsBootstrap::XdsServerTarget& server,
|
|
79
87
|
absl::Status* status);
|
|
80
88
|
~GrpcXdsTransport() override;
|
|
@@ -92,12 +100,16 @@ class GrpcXdsTransportFactory::GrpcXdsTransport final
|
|
|
92
100
|
|
|
93
101
|
void ResetBackoff() override;
|
|
94
102
|
|
|
103
|
+
Channel* channel() const;
|
|
104
|
+
|
|
95
105
|
private:
|
|
96
106
|
class StateWatcher;
|
|
97
107
|
|
|
98
108
|
WeakRefCountedPtr<GrpcXdsTransportFactory> factory_;
|
|
99
109
|
std::string key_;
|
|
100
|
-
RefCountedPtr<
|
|
110
|
+
RefCountedPtr<SharedChannel> channel_;
|
|
111
|
+
std::vector<std::pair<std::string, std::string>> initial_metadata_;
|
|
112
|
+
Duration timeout_;
|
|
101
113
|
|
|
102
114
|
Mutex mu_;
|
|
103
115
|
absl::flat_hash_map<RefCountedPtr<ConnectivityFailureWatcher>, StateWatcher*>
|
|
@@ -107,9 +119,12 @@ class GrpcXdsTransportFactory::GrpcXdsTransport final
|
|
|
107
119
|
class GrpcXdsTransportFactory::GrpcXdsTransport::GrpcStreamingCall final
|
|
108
120
|
: public XdsTransportFactory::XdsTransport::StreamingCall {
|
|
109
121
|
public:
|
|
110
|
-
GrpcStreamingCall(
|
|
111
|
-
|
|
112
|
-
|
|
122
|
+
GrpcStreamingCall(
|
|
123
|
+
WeakRefCountedPtr<GrpcXdsTransportFactory> factory, Channel* channel,
|
|
124
|
+
const char* method,
|
|
125
|
+
std::unique_ptr<StreamingCall::EventHandler> event_handler,
|
|
126
|
+
const std::vector<std::pair<std::string, std::string>>& initial_metadata,
|
|
127
|
+
Duration timeout);
|
|
113
128
|
~GrpcStreamingCall() override;
|
|
114
129
|
|
|
115
130
|
void Orphan() override;
|
|
@@ -118,9 +133,12 @@ class GrpcXdsTransportFactory::GrpcXdsTransport::GrpcStreamingCall final
|
|
|
118
133
|
|
|
119
134
|
void StartRecvMessage() override;
|
|
120
135
|
|
|
136
|
+
void SendHalfClose() override;
|
|
137
|
+
|
|
121
138
|
private:
|
|
122
139
|
static void OnRecvInitialMetadata(void* arg, grpc_error_handle /*error*/);
|
|
123
140
|
static void OnRequestSent(void* arg, grpc_error_handle error);
|
|
141
|
+
static void OnHalfClosed(void* arg, grpc_error_handle error);
|
|
124
142
|
static void OnResponseReceived(void* arg, grpc_error_handle /*error*/);
|
|
125
143
|
static void OnStatusReceived(void* arg, grpc_error_handle /*error*/);
|
|
126
144
|
|
|
@@ -135,10 +153,16 @@ class GrpcXdsTransportFactory::GrpcXdsTransport::GrpcStreamingCall final
|
|
|
135
153
|
grpc_metadata_array initial_metadata_recv_;
|
|
136
154
|
grpc_closure on_recv_initial_metadata_;
|
|
137
155
|
|
|
156
|
+
// send_initial_metadata
|
|
157
|
+
std::vector<grpc_metadata> send_initial_metadata_;
|
|
158
|
+
|
|
138
159
|
// send_message
|
|
139
160
|
grpc_byte_buffer* send_message_payload_ = nullptr;
|
|
140
161
|
grpc_closure on_request_sent_;
|
|
141
162
|
|
|
163
|
+
// half_close
|
|
164
|
+
grpc_closure on_half_closed_;
|
|
165
|
+
|
|
142
166
|
// recv_message
|
|
143
167
|
grpc_byte_buffer* recv_message_payload_ = nullptr;
|
|
144
168
|
grpc_closure on_response_received_;
|
|
@@ -29,15 +29,14 @@
|
|
|
29
29
|
#include "envoy/service/load_stats/v3/lrs.upb.h"
|
|
30
30
|
#include "envoy/service/load_stats/v3/lrs.upbdefs.h"
|
|
31
31
|
#include "google/protobuf/duration.upb.h"
|
|
32
|
+
#include "src/core/config/experiment_env_var.h"
|
|
32
33
|
#include "src/core/lib/debug/trace.h"
|
|
33
34
|
#include "src/core/lib/iomgr/exec_ctx.h"
|
|
34
35
|
#include "src/core/util/backoff.h"
|
|
35
36
|
#include "src/core/util/debug_location.h"
|
|
36
|
-
#include "src/core/util/env.h"
|
|
37
37
|
#include "src/core/util/grpc_check.h"
|
|
38
38
|
#include "src/core/util/orphanable.h"
|
|
39
39
|
#include "src/core/util/ref_counted_ptr.h"
|
|
40
|
-
#include "src/core/util/string.h"
|
|
41
40
|
#include "src/core/util/sync.h"
|
|
42
41
|
#include "src/core/util/upb_utils.h"
|
|
43
42
|
#include "src/core/util/uri.h"
|
|
@@ -64,11 +63,8 @@ using ::grpc_event_engine::experimental::EventEngine;
|
|
|
64
63
|
|
|
65
64
|
// TODO(roth): Remove this after the 1.83 release.
|
|
66
65
|
bool XdsOrcaLrsPropagationChangesEnabled() {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
bool parsed_value;
|
|
70
|
-
bool parse_succeeded = gpr_parse_bool_value(value->c_str(), &parsed_value);
|
|
71
|
-
return parse_succeeded && parsed_value;
|
|
66
|
+
return IsExperimentEnvVarEnabled("GRPC_EXPERIMENTAL_XDS_ORCA_LRS_PROPAGATION",
|
|
67
|
+
/*default_value=*/true);
|
|
72
68
|
}
|
|
73
69
|
|
|
74
70
|
namespace {
|
|
@@ -16,32 +16,20 @@
|
|
|
16
16
|
|
|
17
17
|
#include "src/core/xds/xds_client/xds_bootstrap.h"
|
|
18
18
|
|
|
19
|
-
#include
|
|
20
|
-
|
|
21
|
-
#include <optional>
|
|
22
|
-
|
|
23
|
-
#include "src/core/util/env.h"
|
|
24
|
-
#include "src/core/util/string.h"
|
|
19
|
+
#include "src/core/config/experiment_env_var.h"
|
|
25
20
|
|
|
26
21
|
namespace grpc_core {
|
|
27
22
|
|
|
28
23
|
// TODO(roth,apolcyn): remove this federation env var after the 1.55
|
|
29
24
|
// release.
|
|
30
25
|
bool XdsFederationEnabled() {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
bool parsed_value;
|
|
34
|
-
bool parse_succeeded = gpr_parse_bool_value(value->c_str(), &parsed_value);
|
|
35
|
-
return parse_succeeded && parsed_value;
|
|
26
|
+
return IsExperimentEnvVarEnabled("GRPC_EXPERIMENTAL_XDS_FEDERATION",
|
|
27
|
+
/*default_value=*/true);
|
|
36
28
|
}
|
|
37
29
|
|
|
38
30
|
// TODO(roth): Remove this once the feature passes interop tests.
|
|
39
31
|
bool XdsDataErrorHandlingEnabled() {
|
|
40
|
-
|
|
41
|
-
if (!value.has_value()) return false;
|
|
42
|
-
bool parsed_value;
|
|
43
|
-
bool parse_succeeded = gpr_parse_bool_value(value->c_str(), &parsed_value);
|
|
44
|
-
return parse_succeeded && parsed_value;
|
|
32
|
+
return IsExperimentEnvVarEnabled("GRPC_EXPERIMENTAL_XDS_DATA_ERROR_HANDLING");
|
|
45
33
|
}
|
|
46
34
|
|
|
47
35
|
} // namespace grpc_core
|
|
@@ -35,14 +35,13 @@
|
|
|
35
35
|
#include "google/protobuf/any.upb.h"
|
|
36
36
|
#include "google/protobuf/timestamp.upb.h"
|
|
37
37
|
#include "google/rpc/status.upb.h"
|
|
38
|
+
#include "src/core/config/experiment_env_var.h"
|
|
38
39
|
#include "src/core/lib/iomgr/exec_ctx.h"
|
|
39
40
|
#include "src/core/util/backoff.h"
|
|
40
41
|
#include "src/core/util/debug_location.h"
|
|
41
|
-
#include "src/core/util/env.h"
|
|
42
42
|
#include "src/core/util/grpc_check.h"
|
|
43
43
|
#include "src/core/util/orphanable.h"
|
|
44
44
|
#include "src/core/util/ref_counted_ptr.h"
|
|
45
|
-
#include "src/core/util/string.h"
|
|
46
45
|
#include "src/core/util/sync.h"
|
|
47
46
|
#include "src/core/util/upb_utils.h"
|
|
48
47
|
#include "src/core/util/uri.h"
|
|
@@ -70,18 +69,6 @@
|
|
|
70
69
|
|
|
71
70
|
namespace grpc_core {
|
|
72
71
|
|
|
73
|
-
namespace {
|
|
74
|
-
|
|
75
|
-
bool XdsEndpointFallbackEnabled() {
|
|
76
|
-
auto value = GetEnv("GRPC_EXPERIMENTAL_XDS_ENDPOINT_FALLBACK");
|
|
77
|
-
if (!value.has_value()) return false;
|
|
78
|
-
bool parsed_value;
|
|
79
|
-
bool parse_succeeded = gpr_parse_bool_value(value->c_str(), &parsed_value);
|
|
80
|
-
return parse_succeeded && parsed_value;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
} // namespace
|
|
84
|
-
|
|
85
72
|
using ::grpc_event_engine::experimental::EventEngine;
|
|
86
73
|
|
|
87
74
|
//
|
|
@@ -509,7 +496,7 @@ bool XdsClient::XdsChannel::MaybeFallbackLocked(
|
|
|
509
496
|
auto* bootstrap_authority =
|
|
510
497
|
xds_client_->bootstrap().LookupAuthority(authority);
|
|
511
498
|
xds_servers = bootstrap_authority->servers();
|
|
512
|
-
if (
|
|
499
|
+
if (IsExperimentEnvVarEnabled("GRPC_EXPERIMENTAL_XDS_ENDPOINT_FALLBACK")) {
|
|
513
500
|
fallback_on_reachability_only =
|
|
514
501
|
bootstrap_authority->FallbackOnReachabilityOnly();
|
|
515
502
|
}
|
|
@@ -58,6 +58,9 @@ class XdsTransportFactory : public DualRefCounted<XdsTransportFactory> {
|
|
|
58
58
|
|
|
59
59
|
// Starts a recv_message operation on the stream.
|
|
60
60
|
virtual void StartRecvMessage() = 0;
|
|
61
|
+
|
|
62
|
+
// Half-closes the stream from the client side.
|
|
63
|
+
virtual void SendHalfClose() = 0;
|
|
61
64
|
};
|
|
62
65
|
|
|
63
66
|
// A watcher for connectivity failures.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
require 'google/protobuf'
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
descriptor_data = "\n%src/proto/grpc/testing/messages.proto\x12\x0cgrpc.testing\"\x1a\n\tBoolValue\x12\r\n\x05value\x18\x01 \x01(\x08\"@\n\x07Payload\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.grpc.testing.PayloadType\x12\x0c\n\x04\x62ody\x18\x02 \x01(\x0c\"+\n\nEchoStatus\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07message\x18\x02 \x01(\t\"\xc3\x03\n\rSimpleRequest\x12\x30\n\rresponse_type\x18\x01 \x01(\x0e\x32\x19.grpc.testing.PayloadType\x12\x15\n\rresponse_size\x18\x02 \x01(\x05\x12&\n\x07payload\x18\x03 \x01(\x0b\x32\x15.grpc.testing.Payload\x12\x15\n\rfill_username\x18\x04 \x01(\x08\x12\x18\n\x10\x66ill_oauth_scope\x18\x05 \x01(\x08\x12\x34\n\x13response_compressed\x18\x06 \x01(\x0b\x32\x17.grpc.testing.BoolValue\x12\x31\n\x0fresponse_status\x18\x07 \x01(\x0b\x32\x18.grpc.testing.EchoStatus\x12\x32\n\x11\x65xpect_compressed\x18\x08 \x01(\x0b\x32\x17.grpc.testing.BoolValue\x12\x16\n\x0e\x66ill_server_id\x18\t \x01(\x08\x12\x1e\n\x16\x66ill_grpclb_route_type\x18\n \x01(\x08\x12;\n\x15orca_per_query_report\x18\x0b \x01(\x0b\x32\x1c.grpc.testing.TestOrcaReport\"\xbe\x01\n\x0eSimpleResponse\x12&\n\x07payload\x18\x01 \x01(\x0b\x32\x15.grpc.testing.Payload\x12\x10\n\x08username\x18\x02 \x01(\t\x12\x13\n\x0boauth_scope\x18\x03 \x01(\t\x12\x11\n\tserver_id\x18\x04 \x01(\t\x12\x38\n\x11grpclb_route_type\x18\x05 \x01(\x0e\x32\x1d.grpc.testing.GrpclbRouteType\x12\x10\n\x08hostname\x18\x06 \x01(\t\"w\n\x19StreamingInputCallRequest\x12&\n\x07payload\x18\x01 \x01(\x0b\x32\x15.grpc.testing.Payload\x12\x32\n\x11\x65xpect_compressed\x18\x02 \x01(\x0b\x32\x17.grpc.testing.BoolValue\"=\n\x1aStreamingInputCallResponse\x12\x1f\n\x17\x61ggregated_payload_size\x18\x01 \x01(\x05\"
|
|
8
|
+
descriptor_data = "\n%src/proto/grpc/testing/messages.proto\x12\x0cgrpc.testing\"\x1a\n\tBoolValue\x12\r\n\x05value\x18\x01 \x01(\x08\"@\n\x07Payload\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.grpc.testing.PayloadType\x12\x0c\n\x04\x62ody\x18\x02 \x01(\x0c\"+\n\nEchoStatus\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07message\x18\x02 \x01(\t\"\xc3\x03\n\rSimpleRequest\x12\x30\n\rresponse_type\x18\x01 \x01(\x0e\x32\x19.grpc.testing.PayloadType\x12\x15\n\rresponse_size\x18\x02 \x01(\x05\x12&\n\x07payload\x18\x03 \x01(\x0b\x32\x15.grpc.testing.Payload\x12\x15\n\rfill_username\x18\x04 \x01(\x08\x12\x18\n\x10\x66ill_oauth_scope\x18\x05 \x01(\x08\x12\x34\n\x13response_compressed\x18\x06 \x01(\x0b\x32\x17.grpc.testing.BoolValue\x12\x31\n\x0fresponse_status\x18\x07 \x01(\x0b\x32\x18.grpc.testing.EchoStatus\x12\x32\n\x11\x65xpect_compressed\x18\x08 \x01(\x0b\x32\x17.grpc.testing.BoolValue\x12\x16\n\x0e\x66ill_server_id\x18\t \x01(\x08\x12\x1e\n\x16\x66ill_grpclb_route_type\x18\n \x01(\x08\x12;\n\x15orca_per_query_report\x18\x0b \x01(\x0b\x32\x1c.grpc.testing.TestOrcaReport\"\xbe\x01\n\x0eSimpleResponse\x12&\n\x07payload\x18\x01 \x01(\x0b\x32\x15.grpc.testing.Payload\x12\x10\n\x08username\x18\x02 \x01(\t\x12\x13\n\x0boauth_scope\x18\x03 \x01(\t\x12\x11\n\tserver_id\x18\x04 \x01(\t\x12\x38\n\x11grpclb_route_type\x18\x05 \x01(\x0e\x32\x1d.grpc.testing.GrpclbRouteType\x12\x10\n\x08hostname\x18\x06 \x01(\t\"w\n\x19StreamingInputCallRequest\x12&\n\x07payload\x18\x01 \x01(\x0b\x32\x15.grpc.testing.Payload\x12\x32\n\x11\x65xpect_compressed\x18\x02 \x01(\x0b\x32\x17.grpc.testing.BoolValue\"=\n\x1aStreamingInputCallResponse\x12\x1f\n\x17\x61ggregated_payload_size\x18\x01 \x01(\x05\"\x9f\x01\n\x12ResponseParameters\x12\x0c\n\x04size\x18\x01 \x01(\x05\x12\x13\n\x0binterval_us\x18\x02 \x01(\x05\x12+\n\ncompressed\x18\x03 \x01(\x0b\x32\x17.grpc.testing.BoolValue\x12\x39\n\x18\x66ill_peer_socket_address\x18\x04 \x01(\x0b\x32\x17.grpc.testing.BoolValue\"\x9f\x02\n\x1aStreamingOutputCallRequest\x12\x30\n\rresponse_type\x18\x01 \x01(\x0e\x32\x19.grpc.testing.PayloadType\x12=\n\x13response_parameters\x18\x02 \x03(\x0b\x32 .grpc.testing.ResponseParameters\x12&\n\x07payload\x18\x03 \x01(\x0b\x32\x15.grpc.testing.Payload\x12\x31\n\x0fresponse_status\x18\x07 \x01(\x0b\x32\x18.grpc.testing.EchoStatus\x12\x35\n\x0forca_oob_report\x18\x08 \x01(\x0b\x32\x1c.grpc.testing.TestOrcaReport\"b\n\x1bStreamingOutputCallResponse\x12&\n\x07payload\x18\x01 \x01(\x0b\x32\x15.grpc.testing.Payload\x12\x1b\n\x13peer_socket_address\x18\x02 \x01(\t\"3\n\x0fReconnectParams\x12 \n\x18max_reconnect_backoff_ms\x18\x01 \x01(\x05\"3\n\rReconnectInfo\x12\x0e\n\x06passed\x18\x01 \x01(\x08\x12\x12\n\nbackoff_ms\x18\x02 \x03(\x05\"X\n\x18LoadBalancerStatsRequest\x12\x10\n\x08num_rpcs\x18\x01 \x01(\x05\x12\x13\n\x0btimeout_sec\x18\x02 \x01(\x05\x12\x15\n\rmetadata_keys\x18\x03 \x03(\t\"\xb2\x08\n\x19LoadBalancerStatsResponse\x12M\n\x0crpcs_by_peer\x18\x01 \x03(\x0b\x32\x37.grpc.testing.LoadBalancerStatsResponse.RpcsByPeerEntry\x12\x14\n\x0cnum_failures\x18\x02 \x01(\x05\x12Q\n\x0erpcs_by_method\x18\x03 \x03(\x0b\x32\x39.grpc.testing.LoadBalancerStatsResponse.RpcsByMethodEntry\x12W\n\x11metadatas_by_peer\x18\x04 \x03(\x0b\x32<.grpc.testing.LoadBalancerStatsResponse.MetadatasByPeerEntry\x1ao\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x42\n\x04type\x18\x03 \x01(\x0e\x32\x34.grpc.testing.LoadBalancerStatsResponse.MetadataType\x1aV\n\x0bRpcMetadata\x12G\n\x08metadata\x18\x01 \x03(\x0b\x32\x35.grpc.testing.LoadBalancerStatsResponse.MetadataEntry\x1a[\n\x0eMetadataByPeer\x12I\n\x0crpc_metadata\x18\x01 \x03(\x0b\x32\x33.grpc.testing.LoadBalancerStatsResponse.RpcMetadata\x1a\x99\x01\n\nRpcsByPeer\x12X\n\x0crpcs_by_peer\x18\x01 \x03(\x0b\x32\x42.grpc.testing.LoadBalancerStatsResponse.RpcsByPeer.RpcsByPeerEntry\x1a\x31\n\x0fRpcsByPeerEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x31\n\x0fRpcsByPeerEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1ag\n\x11RpcsByMethodEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.grpc.testing.LoadBalancerStatsResponse.RpcsByPeer:\x02\x38\x01\x1an\n\x14MetadatasByPeerEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.grpc.testing.LoadBalancerStatsResponse.MetadataByPeer:\x02\x38\x01\"6\n\x0cMetadataType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07INITIAL\x10\x01\x12\x0c\n\x08TRAILING\x10\x02\"%\n#LoadBalancerAccumulatedStatsRequest\"\xd8\x07\n$LoadBalancerAccumulatedStatsResponse\x12v\n\x1anum_rpcs_started_by_method\x18\x01 \x03(\x0b\x32N.grpc.testing.LoadBalancerAccumulatedStatsResponse.NumRpcsStartedByMethodEntryB\x02\x18\x01\x12z\n\x1cnum_rpcs_succeeded_by_method\x18\x02 \x03(\x0b\x32P.grpc.testing.LoadBalancerAccumulatedStatsResponse.NumRpcsSucceededByMethodEntryB\x02\x18\x01\x12t\n\x19num_rpcs_failed_by_method\x18\x03 \x03(\x0b\x32M.grpc.testing.LoadBalancerAccumulatedStatsResponse.NumRpcsFailedByMethodEntryB\x02\x18\x01\x12`\n\x10stats_per_method\x18\x04 \x03(\x0b\x32\x46.grpc.testing.LoadBalancerAccumulatedStatsResponse.StatsPerMethodEntry\x1a=\n\x1bNumRpcsStartedByMethodEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a?\n\x1dNumRpcsSucceededByMethodEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a<\n\x1aNumRpcsFailedByMethodEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\xae\x01\n\x0bMethodStats\x12\x14\n\x0crpcs_started\x18\x01 \x01(\x05\x12Z\n\x06result\x18\x02 \x03(\x0b\x32J.grpc.testing.LoadBalancerAccumulatedStatsResponse.MethodStats.ResultEntry\x1a-\n\x0bResultEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1au\n\x13StatsPerMethodEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12M\n\x05value\x18\x02 \x01(\x0b\x32>.grpc.testing.LoadBalancerAccumulatedStatsResponse.MethodStats:\x02\x38\x01\"\xba\x02\n\x16\x43lientConfigureRequest\x12;\n\x05types\x18\x01 \x03(\x0e\x32,.grpc.testing.ClientConfigureRequest.RpcType\x12?\n\x08metadata\x18\x02 \x03(\x0b\x32-.grpc.testing.ClientConfigureRequest.Metadata\x12\x13\n\x0btimeout_sec\x18\x03 \x01(\x05\x1a\x62\n\x08Metadata\x12:\n\x04type\x18\x01 \x01(\x0e\x32,.grpc.testing.ClientConfigureRequest.RpcType\x12\x0b\n\x03key\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\")\n\x07RpcType\x12\x0e\n\nEMPTY_CALL\x10\x00\x12\x0e\n\nUNARY_CALL\x10\x01\"\x19\n\x17\x43lientConfigureResponse\"\x19\n\nMemorySize\x12\x0b\n\x03rss\x18\x01 \x01(\x03\"\xb6\x02\n\x0eTestOrcaReport\x12\x17\n\x0f\x63pu_utilization\x18\x01 \x01(\x01\x12\x1a\n\x12memory_utilization\x18\x02 \x01(\x01\x12\x43\n\x0crequest_cost\x18\x03 \x03(\x0b\x32-.grpc.testing.TestOrcaReport.RequestCostEntry\x12\x42\n\x0butilization\x18\x04 \x03(\x0b\x32-.grpc.testing.TestOrcaReport.UtilizationEntry\x1a\x32\n\x10RequestCostEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x1a\x32\n\x10UtilizationEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\"V\n\x16SetReturnStatusRequest\x12\x1b\n\x13grpc_code_to_return\x18\x01 \x01(\x05\x12\x1f\n\x17grpc_status_description\x18\x02 \x01(\t\"\xe7\x01\n\x0bHookRequest\x12=\n\x07\x63ommand\x18\x01 \x01(\x0e\x32,.grpc.testing.HookRequest.HookRequestCommand\x12\x1b\n\x13grpc_code_to_return\x18\x02 \x01(\x05\x12\x1f\n\x17grpc_status_description\x18\x03 \x01(\t\x12\x13\n\x0bserver_port\x18\x04 \x01(\x05\"F\n\x12HookRequestCommand\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\t\n\x05START\x10\x01\x12\x08\n\x04STOP\x10\x02\x12\n\n\x06RETURN\x10\x03\"\x0e\n\x0cHookResponse*\x1f\n\x0bPayloadType\x12\x10\n\x0c\x43OMPRESSABLE\x10\x00*o\n\x0fGrpclbRouteType\x12\x1d\n\x19GRPCLB_ROUTE_TYPE_UNKNOWN\x10\x00\x12\x1e\n\x1aGRPCLB_ROUTE_TYPE_FALLBACK\x10\x01\x12\x1d\n\x19GRPCLB_ROUTE_TYPE_BACKEND\x10\x02\x42\x1d\n\x1bio.grpc.testing.integrationb\x06proto3"
|
|
9
9
|
|
|
10
10
|
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
11
11
|
pool.add_serialized_file(descriptor_data)
|