grpc 1.23.0 → 1.24.0
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 +765 -485
- data/include/grpc/grpc.h +3 -1
- data/include/grpc/grpc_security.h +20 -4
- data/include/grpc/impl/codegen/grpc_types.h +6 -5
- data/include/grpc/impl/codegen/port_platform.h +25 -0
- data/src/core/ext/filters/client_channel/backend_metric.cc +78 -0
- data/src/core/ext/filters/client_channel/backend_metric.h +36 -0
- data/src/core/ext/filters/client_channel/channel_connectivity.cc +16 -2
- data/src/core/ext/filters/client_channel/client_channel.cc +325 -267
- data/src/core/ext/filters/client_channel/client_channel_factory.h +0 -4
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +23 -32
- data/src/core/ext/filters/client_channel/http_proxy.cc +7 -3
- data/src/core/ext/filters/client_channel/lb_policy.cc +1 -1
- data/src/core/ext/filters/client_channel/lb_policy.h +58 -34
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +46 -50
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h +9 -2
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +35 -17
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +130 -215
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +34 -21
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +1120 -802
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.h +8 -2
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc +33 -12
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc +151 -40
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h +184 -26
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc +389 -245
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h +98 -60
- data/src/core/ext/filters/client_channel/lb_policy_registry.cc +6 -1
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +89 -0
- data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +3 -8
- data/src/core/ext/filters/client_channel/server_address.cc +1 -3
- data/src/core/ext/filters/client_channel/server_address.h +1 -1
- data/src/core/ext/filters/client_channel/subchannel.h +2 -1
- data/src/core/ext/filters/client_idle/client_idle_filter.cc +207 -29
- data/src/core/ext/filters/http/client/http_client_filter.cc +10 -8
- data/src/core/ext/filters/http/client_authority_filter.cc +1 -1
- data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +10 -7
- data/src/core/ext/filters/http/server/http_server_filter.cc +52 -26
- data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +23 -20
- data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +24 -21
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +37 -24
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +1 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +237 -191
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +29 -27
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +1 -1
- data/src/core/ext/transport/chttp2/transport/hpack_table.cc +19 -4
- data/src/core/ext/transport/chttp2/transport/hpack_table.h +13 -4
- data/src/core/ext/transport/chttp2/transport/incoming_metadata.cc +2 -1
- data/src/core/ext/transport/chttp2/transport/internal.h +0 -2
- data/src/core/ext/transport/chttp2/transport/parsing.cc +99 -71
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +222 -0
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h +818 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c +314 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +1142 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +53 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h +158 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h +69 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c +49 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h +240 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +110 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h +324 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +235 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +661 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +84 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +274 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +175 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h +572 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +150 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +596 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h +80 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +95 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +308 -0
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +128 -0
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h +392 -0
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c +91 -0
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +236 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +88 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h +258 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +111 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h +324 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c +23 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h +50 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c +52 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h +130 -0
- data/src/core/ext/upb-generated/envoy/type/percent.upb.c +39 -0
- data/src/core/ext/upb-generated/envoy/type/percent.upb.h +87 -0
- data/src/core/ext/upb-generated/envoy/type/range.upb.c +39 -0
- data/src/core/ext/upb-generated/envoy/type/range.upb.h +85 -0
- data/src/core/ext/upb-generated/gogoproto/gogo.upb.c +17 -0
- data/src/core/ext/upb-generated/gogoproto/gogo.upb.h +30 -0
- data/src/core/ext/upb-generated/google/api/annotations.upb.c +18 -0
- data/src/core/ext/upb-generated/google/api/annotations.upb.h +30 -0
- data/src/core/ext/upb-generated/google/api/http.upb.c +66 -0
- data/src/core/ext/upb-generated/google/api/http.upb.h +190 -0
- data/src/core/ext/upb-generated/google/protobuf/any.upb.c +27 -0
- data/src/core/ext/upb-generated/google/protobuf/any.upb.h +58 -0
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +485 -0
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +1690 -0
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.c +27 -0
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.h +58 -0
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.c +22 -0
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.h +50 -0
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.c +79 -0
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.h +215 -0
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c +27 -0
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h +58 -0
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c +106 -0
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h +238 -0
- data/src/core/ext/upb-generated/google/rpc/status.upb.c +33 -0
- data/src/core/ext/upb-generated/google/rpc/status.upb.h +74 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c +49 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h +126 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +209 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +681 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c +42 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h +109 -0
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c +36 -0
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h +84 -0
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c +133 -0
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +359 -0
- data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c +58 -0
- data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h +144 -0
- data/src/core/ext/upb-generated/validate/validate.upb.c +443 -0
- data/src/core/ext/upb-generated/validate/validate.upb.h +2037 -0
- data/src/core/lib/channel/channel_args.cc +21 -0
- data/src/core/lib/channel/channel_args.h +16 -2
- data/src/core/lib/channel/channel_stack.h +2 -1
- data/src/core/lib/channel/channelz.cc +54 -56
- data/src/core/lib/channel/channelz.h +29 -12
- data/src/core/lib/compression/compression.cc +2 -1
- data/src/core/lib/compression/compression_internal.h +8 -0
- data/src/core/lib/gpr/log_linux.cc +2 -2
- data/src/core/lib/gpr/log_posix.cc +2 -2
- data/src/core/lib/gpr/time_precise.cc +123 -36
- data/src/core/lib/gpr/time_precise.h +37 -0
- data/src/core/lib/gprpp/abstract.h +10 -0
- data/src/core/lib/gprpp/atomic.h +4 -0
- data/src/core/lib/gprpp/inlined_vector.h +20 -4
- data/src/core/lib/gprpp/map.h +109 -6
- data/src/core/lib/gprpp/memory.h +6 -0
- data/src/core/lib/gprpp/ref_counted_ptr.h +2 -0
- data/src/core/lib/iomgr/ev_epollex_linux.cc +29 -54
- data/src/core/lib/iomgr/exec_ctx.cc +27 -17
- data/src/core/lib/iomgr/exec_ctx.h +3 -0
- data/src/core/lib/iomgr/sockaddr_utils.cc +1 -3
- data/src/core/lib/iomgr/tcp_posix.cc +16 -25
- data/src/core/lib/iomgr/tcp_server_custom.cc +1 -1
- data/src/core/lib/iomgr/timer_manager.cc +8 -1
- data/src/core/lib/iomgr/timer_manager.h +2 -0
- data/src/core/lib/security/credentials/credentials.h +8 -2
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +23 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +3 -0
- data/src/core/lib/security/credentials/tls/spiffe_credentials.cc +3 -3
- data/src/core/lib/security/security_connector/ssl_utils.cc +1 -12
- data/src/core/lib/security/security_connector/ssl_utils.h +10 -6
- data/src/core/lib/security/security_connector/ssl_utils_config.cc +32 -0
- data/src/core/lib/security/security_connector/ssl_utils_config.h +30 -0
- data/src/core/lib/security/security_connector/tls/spiffe_security_connector.cc +161 -49
- data/src/core/lib/security/security_connector/tls/spiffe_security_connector.h +34 -1
- data/src/core/lib/slice/slice_intern.cc +17 -9
- data/src/core/lib/slice/slice_internal.h +34 -7
- data/src/core/lib/slice/slice_utils.h +7 -3
- data/src/core/lib/surface/call.cc +97 -57
- data/src/core/lib/surface/channel.cc +2 -2
- data/src/core/lib/surface/completion_queue.cc +10 -16
- data/src/core/lib/surface/init.cc +3 -0
- data/src/core/lib/surface/server.cc +11 -14
- data/src/core/lib/surface/validate_metadata.cc +4 -0
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/metadata.cc +4 -4
- data/src/core/lib/transport/metadata_batch.cc +72 -16
- data/src/core/lib/transport/metadata_batch.h +38 -0
- data/src/core/lib/transport/static_metadata.cc +814 -1023
- data/src/core/lib/transport/static_metadata.h +271 -213
- data/src/core/lib/transport/transport.h +12 -0
- data/src/core/plugin_registry/grpc_plugin_registry.cc +4 -0
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +104 -76
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +34 -16
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +2 -2
- data/src/core/tsi/alts/handshaker/alts_tsi_utils.cc +10 -6
- data/src/core/tsi/alts/handshaker/alts_tsi_utils.h +4 -3
- data/src/core/tsi/alts/handshaker/transport_security_common_api.cc +74 -48
- data/src/core/tsi/alts/handshaker/transport_security_common_api.h +34 -26
- data/src/core/tsi/ssl_transport_security.cc +14 -6
- data/src/core/tsi/ssl_transport_security.h +4 -0
- data/src/ruby/ext/grpc/ext-export.clang +1 -0
- data/src/ruby/ext/grpc/ext-export.gcc +6 -0
- data/src/ruby/ext/grpc/extconf.rb +5 -0
- data/src/ruby/ext/grpc/rb_enable_cpp.cc +22 -0
- data/src/ruby/ext/grpc/rb_grpc.c +1 -42
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +4 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +6 -0
- data/src/ruby/lib/grpc.rb +2 -0
- data/src/ruby/lib/grpc/core/status_codes.rb +135 -0
- data/src/ruby/lib/grpc/errors.rb +4 -7
- data/src/ruby/lib/grpc/google_rpc_status_utils.rb +9 -4
- data/src/ruby/lib/grpc/structs.rb +15 -0
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/spec/errors_spec.rb +1 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/package_options_import.proto +22 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/package_options_ruby_style.proto +34 -0
- data/src/ruby/spec/pb/codegen/package_option_spec.rb +53 -29
- data/third_party/upb/upb/decode.c +604 -0
- data/third_party/upb/upb/decode.h +21 -0
- data/third_party/upb/upb/encode.c +378 -0
- data/third_party/upb/upb/encode.h +21 -0
- data/third_party/upb/upb/generated_util.h +105 -0
- data/third_party/upb/upb/msg.c +111 -0
- data/third_party/upb/upb/msg.h +69 -0
- data/third_party/upb/upb/port.c +27 -0
- data/third_party/upb/upb/port_def.inc +152 -0
- data/third_party/upb/upb/port_undef.inc +21 -0
- data/third_party/upb/upb/table.c +911 -0
- data/third_party/upb/upb/table.int.h +507 -0
- data/third_party/upb/upb/upb.c +261 -0
- data/third_party/upb/upb/upb.h +364 -0
- metadata +129 -50
- data/src/core/ext/filters/client_channel/health/health.pb.c +0 -23
- data/src/core/ext/filters/client_channel/health/health.pb.h +0 -73
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c +0 -19
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h +0 -54
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c +0 -19
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h +0 -54
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c +0 -89
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h +0 -164
- data/src/core/tsi/alts/handshaker/alts_handshaker_service_api.cc +0 -520
- data/src/core/tsi/alts/handshaker/alts_handshaker_service_api.h +0 -323
- data/src/core/tsi/alts/handshaker/alts_handshaker_service_api_util.cc +0 -145
- data/src/core/tsi/alts/handshaker/alts_handshaker_service_api_util.h +0 -149
- data/src/core/tsi/alts/handshaker/altscontext.pb.c +0 -47
- data/src/core/tsi/alts/handshaker/altscontext.pb.h +0 -63
- data/src/core/tsi/alts/handshaker/handshaker.pb.c +0 -122
- data/src/core/tsi/alts/handshaker/handshaker.pb.h +0 -254
- data/src/core/tsi/alts/handshaker/transport_security_common.pb.c +0 -49
- data/src/core/tsi/alts/handshaker/transport_security_common.pb.h +0 -78
- data/third_party/nanopb/pb.h +0 -579
- data/third_party/nanopb/pb_common.c +0 -97
- data/third_party/nanopb/pb_common.h +0 -42
- data/third_party/nanopb/pb_decode.c +0 -1347
- data/third_party/nanopb/pb_decode.h +0 -149
- data/third_party/nanopb/pb_encode.c +0 -696
- data/third_party/nanopb/pb_encode.h +0 -154
@@ -0,0 +1,42 @@
|
|
1
|
+
/* This file was generated by upbc (the upb compiler) from the input
|
2
|
+
* file:
|
3
|
+
*
|
4
|
+
* src/proto/grpc/gcp/transport_security_common.proto
|
5
|
+
*
|
6
|
+
* Do not edit -- your changes will be discarded when the file is
|
7
|
+
* regenerated. */
|
8
|
+
|
9
|
+
#include <stddef.h>
|
10
|
+
#include "upb/msg.h"
|
11
|
+
#include "src/proto/grpc/gcp/transport_security_common.upb.h"
|
12
|
+
|
13
|
+
#include "upb/port_def.inc"
|
14
|
+
|
15
|
+
static const upb_msglayout *const grpc_gcp_RpcProtocolVersions_submsgs[2] = {
|
16
|
+
&grpc_gcp_RpcProtocolVersions_Version_msginit,
|
17
|
+
};
|
18
|
+
|
19
|
+
static const upb_msglayout_field grpc_gcp_RpcProtocolVersions__fields[2] = {
|
20
|
+
{1, UPB_SIZE(0, 0), 0, 0, 11, 1},
|
21
|
+
{2, UPB_SIZE(4, 8), 0, 0, 11, 1},
|
22
|
+
};
|
23
|
+
|
24
|
+
const upb_msglayout grpc_gcp_RpcProtocolVersions_msginit = {
|
25
|
+
&grpc_gcp_RpcProtocolVersions_submsgs[0],
|
26
|
+
&grpc_gcp_RpcProtocolVersions__fields[0],
|
27
|
+
UPB_SIZE(8, 16), 2, false,
|
28
|
+
};
|
29
|
+
|
30
|
+
static const upb_msglayout_field grpc_gcp_RpcProtocolVersions_Version__fields[2] = {
|
31
|
+
{1, UPB_SIZE(0, 0), 0, 0, 13, 1},
|
32
|
+
{2, UPB_SIZE(4, 4), 0, 0, 13, 1},
|
33
|
+
};
|
34
|
+
|
35
|
+
const upb_msglayout grpc_gcp_RpcProtocolVersions_Version_msginit = {
|
36
|
+
NULL,
|
37
|
+
&grpc_gcp_RpcProtocolVersions_Version__fields[0],
|
38
|
+
UPB_SIZE(8, 8), 2, false,
|
39
|
+
};
|
40
|
+
|
41
|
+
#include "upb/port_undef.inc"
|
42
|
+
|
@@ -0,0 +1,109 @@
|
|
1
|
+
/* This file was generated by upbc (the upb compiler) from the input
|
2
|
+
* file:
|
3
|
+
*
|
4
|
+
* src/proto/grpc/gcp/transport_security_common.proto
|
5
|
+
*
|
6
|
+
* Do not edit -- your changes will be discarded when the file is
|
7
|
+
* regenerated. */
|
8
|
+
|
9
|
+
#ifndef SRC_PROTO_GRPC_GCP_TRANSPORT_SECURITY_COMMON_PROTO_UPB_H_
|
10
|
+
#define SRC_PROTO_GRPC_GCP_TRANSPORT_SECURITY_COMMON_PROTO_UPB_H_
|
11
|
+
|
12
|
+
#include "upb/generated_util.h"
|
13
|
+
#include "upb/msg.h"
|
14
|
+
#include "upb/decode.h"
|
15
|
+
#include "upb/encode.h"
|
16
|
+
|
17
|
+
#include "upb/port_def.inc"
|
18
|
+
|
19
|
+
#ifdef __cplusplus
|
20
|
+
extern "C" {
|
21
|
+
#endif
|
22
|
+
|
23
|
+
struct grpc_gcp_RpcProtocolVersions;
|
24
|
+
struct grpc_gcp_RpcProtocolVersions_Version;
|
25
|
+
typedef struct grpc_gcp_RpcProtocolVersions grpc_gcp_RpcProtocolVersions;
|
26
|
+
typedef struct grpc_gcp_RpcProtocolVersions_Version grpc_gcp_RpcProtocolVersions_Version;
|
27
|
+
extern const upb_msglayout grpc_gcp_RpcProtocolVersions_msginit;
|
28
|
+
extern const upb_msglayout grpc_gcp_RpcProtocolVersions_Version_msginit;
|
29
|
+
|
30
|
+
typedef enum {
|
31
|
+
grpc_gcp_SECURITY_NONE = 0,
|
32
|
+
grpc_gcp_INTEGRITY_ONLY = 1,
|
33
|
+
grpc_gcp_INTEGRITY_AND_PRIVACY = 2
|
34
|
+
} grpc_gcp_SecurityLevel;
|
35
|
+
|
36
|
+
|
37
|
+
/* grpc.gcp.RpcProtocolVersions */
|
38
|
+
|
39
|
+
UPB_INLINE grpc_gcp_RpcProtocolVersions *grpc_gcp_RpcProtocolVersions_new(upb_arena *arena) {
|
40
|
+
return (grpc_gcp_RpcProtocolVersions *)upb_msg_new(&grpc_gcp_RpcProtocolVersions_msginit, arena);
|
41
|
+
}
|
42
|
+
UPB_INLINE grpc_gcp_RpcProtocolVersions *grpc_gcp_RpcProtocolVersions_parse(const char *buf, size_t size,
|
43
|
+
upb_arena *arena) {
|
44
|
+
grpc_gcp_RpcProtocolVersions *ret = grpc_gcp_RpcProtocolVersions_new(arena);
|
45
|
+
return (ret && upb_decode(buf, size, ret, &grpc_gcp_RpcProtocolVersions_msginit, arena)) ? ret : NULL;
|
46
|
+
}
|
47
|
+
UPB_INLINE char *grpc_gcp_RpcProtocolVersions_serialize(const grpc_gcp_RpcProtocolVersions *msg, upb_arena *arena, size_t *len) {
|
48
|
+
return upb_encode(msg, &grpc_gcp_RpcProtocolVersions_msginit, arena, len);
|
49
|
+
}
|
50
|
+
|
51
|
+
UPB_INLINE const grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVersions_max_rpc_version(const grpc_gcp_RpcProtocolVersions *msg) { return UPB_FIELD_AT(msg, const grpc_gcp_RpcProtocolVersions_Version*, UPB_SIZE(0, 0)); }
|
52
|
+
UPB_INLINE const grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVersions_min_rpc_version(const grpc_gcp_RpcProtocolVersions *msg) { return UPB_FIELD_AT(msg, const grpc_gcp_RpcProtocolVersions_Version*, UPB_SIZE(4, 8)); }
|
53
|
+
|
54
|
+
UPB_INLINE void grpc_gcp_RpcProtocolVersions_set_max_rpc_version(grpc_gcp_RpcProtocolVersions *msg, grpc_gcp_RpcProtocolVersions_Version* value) {
|
55
|
+
UPB_FIELD_AT(msg, grpc_gcp_RpcProtocolVersions_Version*, UPB_SIZE(0, 0)) = value;
|
56
|
+
}
|
57
|
+
UPB_INLINE struct grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVersions_mutable_max_rpc_version(grpc_gcp_RpcProtocolVersions *msg, upb_arena *arena) {
|
58
|
+
struct grpc_gcp_RpcProtocolVersions_Version* sub = (struct grpc_gcp_RpcProtocolVersions_Version*)grpc_gcp_RpcProtocolVersions_max_rpc_version(msg);
|
59
|
+
if (sub == NULL) {
|
60
|
+
sub = (struct grpc_gcp_RpcProtocolVersions_Version*)upb_msg_new(&grpc_gcp_RpcProtocolVersions_Version_msginit, arena);
|
61
|
+
if (!sub) return NULL;
|
62
|
+
grpc_gcp_RpcProtocolVersions_set_max_rpc_version(msg, sub);
|
63
|
+
}
|
64
|
+
return sub;
|
65
|
+
}
|
66
|
+
UPB_INLINE void grpc_gcp_RpcProtocolVersions_set_min_rpc_version(grpc_gcp_RpcProtocolVersions *msg, grpc_gcp_RpcProtocolVersions_Version* value) {
|
67
|
+
UPB_FIELD_AT(msg, grpc_gcp_RpcProtocolVersions_Version*, UPB_SIZE(4, 8)) = value;
|
68
|
+
}
|
69
|
+
UPB_INLINE struct grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVersions_mutable_min_rpc_version(grpc_gcp_RpcProtocolVersions *msg, upb_arena *arena) {
|
70
|
+
struct grpc_gcp_RpcProtocolVersions_Version* sub = (struct grpc_gcp_RpcProtocolVersions_Version*)grpc_gcp_RpcProtocolVersions_min_rpc_version(msg);
|
71
|
+
if (sub == NULL) {
|
72
|
+
sub = (struct grpc_gcp_RpcProtocolVersions_Version*)upb_msg_new(&grpc_gcp_RpcProtocolVersions_Version_msginit, arena);
|
73
|
+
if (!sub) return NULL;
|
74
|
+
grpc_gcp_RpcProtocolVersions_set_min_rpc_version(msg, sub);
|
75
|
+
}
|
76
|
+
return sub;
|
77
|
+
}
|
78
|
+
|
79
|
+
/* grpc.gcp.RpcProtocolVersions.Version */
|
80
|
+
|
81
|
+
UPB_INLINE grpc_gcp_RpcProtocolVersions_Version *grpc_gcp_RpcProtocolVersions_Version_new(upb_arena *arena) {
|
82
|
+
return (grpc_gcp_RpcProtocolVersions_Version *)upb_msg_new(&grpc_gcp_RpcProtocolVersions_Version_msginit, arena);
|
83
|
+
}
|
84
|
+
UPB_INLINE grpc_gcp_RpcProtocolVersions_Version *grpc_gcp_RpcProtocolVersions_Version_parse(const char *buf, size_t size,
|
85
|
+
upb_arena *arena) {
|
86
|
+
grpc_gcp_RpcProtocolVersions_Version *ret = grpc_gcp_RpcProtocolVersions_Version_new(arena);
|
87
|
+
return (ret && upb_decode(buf, size, ret, &grpc_gcp_RpcProtocolVersions_Version_msginit, arena)) ? ret : NULL;
|
88
|
+
}
|
89
|
+
UPB_INLINE char *grpc_gcp_RpcProtocolVersions_Version_serialize(const grpc_gcp_RpcProtocolVersions_Version *msg, upb_arena *arena, size_t *len) {
|
90
|
+
return upb_encode(msg, &grpc_gcp_RpcProtocolVersions_Version_msginit, arena, len);
|
91
|
+
}
|
92
|
+
|
93
|
+
UPB_INLINE uint32_t grpc_gcp_RpcProtocolVersions_Version_major(const grpc_gcp_RpcProtocolVersions_Version *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)); }
|
94
|
+
UPB_INLINE uint32_t grpc_gcp_RpcProtocolVersions_Version_minor(const grpc_gcp_RpcProtocolVersions_Version *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(4, 4)); }
|
95
|
+
|
96
|
+
UPB_INLINE void grpc_gcp_RpcProtocolVersions_Version_set_major(grpc_gcp_RpcProtocolVersions_Version *msg, uint32_t value) {
|
97
|
+
UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)) = value;
|
98
|
+
}
|
99
|
+
UPB_INLINE void grpc_gcp_RpcProtocolVersions_Version_set_minor(grpc_gcp_RpcProtocolVersions_Version *msg, uint32_t value) {
|
100
|
+
UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(4, 4)) = value;
|
101
|
+
}
|
102
|
+
|
103
|
+
#ifdef __cplusplus
|
104
|
+
} /* extern "C" */
|
105
|
+
#endif
|
106
|
+
|
107
|
+
#include "upb/port_undef.inc"
|
108
|
+
|
109
|
+
#endif /* SRC_PROTO_GRPC_GCP_TRANSPORT_SECURITY_COMMON_PROTO_UPB_H_ */
|
@@ -0,0 +1,36 @@
|
|
1
|
+
/* This file was generated by upbc (the upb compiler) from the input
|
2
|
+
* file:
|
3
|
+
*
|
4
|
+
* src/proto/grpc/health/v1/health.proto
|
5
|
+
*
|
6
|
+
* Do not edit -- your changes will be discarded when the file is
|
7
|
+
* regenerated. */
|
8
|
+
|
9
|
+
#include <stddef.h>
|
10
|
+
#include "upb/msg.h"
|
11
|
+
#include "src/proto/grpc/health/v1/health.upb.h"
|
12
|
+
|
13
|
+
#include "upb/port_def.inc"
|
14
|
+
|
15
|
+
static const upb_msglayout_field grpc_health_v1_HealthCheckRequest__fields[1] = {
|
16
|
+
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
|
17
|
+
};
|
18
|
+
|
19
|
+
const upb_msglayout grpc_health_v1_HealthCheckRequest_msginit = {
|
20
|
+
NULL,
|
21
|
+
&grpc_health_v1_HealthCheckRequest__fields[0],
|
22
|
+
UPB_SIZE(8, 16), 1, false,
|
23
|
+
};
|
24
|
+
|
25
|
+
static const upb_msglayout_field grpc_health_v1_HealthCheckResponse__fields[1] = {
|
26
|
+
{1, UPB_SIZE(0, 0), 0, 0, 14, 1},
|
27
|
+
};
|
28
|
+
|
29
|
+
const upb_msglayout grpc_health_v1_HealthCheckResponse_msginit = {
|
30
|
+
NULL,
|
31
|
+
&grpc_health_v1_HealthCheckResponse__fields[0],
|
32
|
+
UPB_SIZE(8, 8), 1, false,
|
33
|
+
};
|
34
|
+
|
35
|
+
#include "upb/port_undef.inc"
|
36
|
+
|
@@ -0,0 +1,84 @@
|
|
1
|
+
/* This file was generated by upbc (the upb compiler) from the input
|
2
|
+
* file:
|
3
|
+
*
|
4
|
+
* src/proto/grpc/health/v1/health.proto
|
5
|
+
*
|
6
|
+
* Do not edit -- your changes will be discarded when the file is
|
7
|
+
* regenerated. */
|
8
|
+
|
9
|
+
#ifndef SRC_PROTO_GRPC_HEALTH_V1_HEALTH_PROTO_UPB_H_
|
10
|
+
#define SRC_PROTO_GRPC_HEALTH_V1_HEALTH_PROTO_UPB_H_
|
11
|
+
|
12
|
+
#include "upb/generated_util.h"
|
13
|
+
#include "upb/msg.h"
|
14
|
+
#include "upb/decode.h"
|
15
|
+
#include "upb/encode.h"
|
16
|
+
|
17
|
+
#include "upb/port_def.inc"
|
18
|
+
|
19
|
+
#ifdef __cplusplus
|
20
|
+
extern "C" {
|
21
|
+
#endif
|
22
|
+
|
23
|
+
struct grpc_health_v1_HealthCheckRequest;
|
24
|
+
struct grpc_health_v1_HealthCheckResponse;
|
25
|
+
typedef struct grpc_health_v1_HealthCheckRequest grpc_health_v1_HealthCheckRequest;
|
26
|
+
typedef struct grpc_health_v1_HealthCheckResponse grpc_health_v1_HealthCheckResponse;
|
27
|
+
extern const upb_msglayout grpc_health_v1_HealthCheckRequest_msginit;
|
28
|
+
extern const upb_msglayout grpc_health_v1_HealthCheckResponse_msginit;
|
29
|
+
|
30
|
+
typedef enum {
|
31
|
+
grpc_health_v1_HealthCheckResponse_UNKNOWN = 0,
|
32
|
+
grpc_health_v1_HealthCheckResponse_SERVING = 1,
|
33
|
+
grpc_health_v1_HealthCheckResponse_NOT_SERVING = 2,
|
34
|
+
grpc_health_v1_HealthCheckResponse_SERVICE_UNKNOWN = 3
|
35
|
+
} grpc_health_v1_HealthCheckResponse_ServingStatus;
|
36
|
+
|
37
|
+
|
38
|
+
/* grpc.health.v1.HealthCheckRequest */
|
39
|
+
|
40
|
+
UPB_INLINE grpc_health_v1_HealthCheckRequest *grpc_health_v1_HealthCheckRequest_new(upb_arena *arena) {
|
41
|
+
return (grpc_health_v1_HealthCheckRequest *)upb_msg_new(&grpc_health_v1_HealthCheckRequest_msginit, arena);
|
42
|
+
}
|
43
|
+
UPB_INLINE grpc_health_v1_HealthCheckRequest *grpc_health_v1_HealthCheckRequest_parse(const char *buf, size_t size,
|
44
|
+
upb_arena *arena) {
|
45
|
+
grpc_health_v1_HealthCheckRequest *ret = grpc_health_v1_HealthCheckRequest_new(arena);
|
46
|
+
return (ret && upb_decode(buf, size, ret, &grpc_health_v1_HealthCheckRequest_msginit, arena)) ? ret : NULL;
|
47
|
+
}
|
48
|
+
UPB_INLINE char *grpc_health_v1_HealthCheckRequest_serialize(const grpc_health_v1_HealthCheckRequest *msg, upb_arena *arena, size_t *len) {
|
49
|
+
return upb_encode(msg, &grpc_health_v1_HealthCheckRequest_msginit, arena, len);
|
50
|
+
}
|
51
|
+
|
52
|
+
UPB_INLINE upb_strview grpc_health_v1_HealthCheckRequest_service(const grpc_health_v1_HealthCheckRequest *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
|
53
|
+
|
54
|
+
UPB_INLINE void grpc_health_v1_HealthCheckRequest_set_service(grpc_health_v1_HealthCheckRequest *msg, upb_strview value) {
|
55
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
|
56
|
+
}
|
57
|
+
|
58
|
+
/* grpc.health.v1.HealthCheckResponse */
|
59
|
+
|
60
|
+
UPB_INLINE grpc_health_v1_HealthCheckResponse *grpc_health_v1_HealthCheckResponse_new(upb_arena *arena) {
|
61
|
+
return (grpc_health_v1_HealthCheckResponse *)upb_msg_new(&grpc_health_v1_HealthCheckResponse_msginit, arena);
|
62
|
+
}
|
63
|
+
UPB_INLINE grpc_health_v1_HealthCheckResponse *grpc_health_v1_HealthCheckResponse_parse(const char *buf, size_t size,
|
64
|
+
upb_arena *arena) {
|
65
|
+
grpc_health_v1_HealthCheckResponse *ret = grpc_health_v1_HealthCheckResponse_new(arena);
|
66
|
+
return (ret && upb_decode(buf, size, ret, &grpc_health_v1_HealthCheckResponse_msginit, arena)) ? ret : NULL;
|
67
|
+
}
|
68
|
+
UPB_INLINE char *grpc_health_v1_HealthCheckResponse_serialize(const grpc_health_v1_HealthCheckResponse *msg, upb_arena *arena, size_t *len) {
|
69
|
+
return upb_encode(msg, &grpc_health_v1_HealthCheckResponse_msginit, arena, len);
|
70
|
+
}
|
71
|
+
|
72
|
+
UPB_INLINE int32_t grpc_health_v1_HealthCheckResponse_status(const grpc_health_v1_HealthCheckResponse *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); }
|
73
|
+
|
74
|
+
UPB_INLINE void grpc_health_v1_HealthCheckResponse_set_status(grpc_health_v1_HealthCheckResponse *msg, int32_t value) {
|
75
|
+
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value;
|
76
|
+
}
|
77
|
+
|
78
|
+
#ifdef __cplusplus
|
79
|
+
} /* extern "C" */
|
80
|
+
#endif
|
81
|
+
|
82
|
+
#include "upb/port_undef.inc"
|
83
|
+
|
84
|
+
#endif /* SRC_PROTO_GRPC_HEALTH_V1_HEALTH_PROTO_UPB_H_ */
|
@@ -0,0 +1,133 @@
|
|
1
|
+
/* This file was generated by upbc (the upb compiler) from the input
|
2
|
+
* file:
|
3
|
+
*
|
4
|
+
* src/proto/grpc/lb/v1/load_balancer.proto
|
5
|
+
*
|
6
|
+
* Do not edit -- your changes will be discarded when the file is
|
7
|
+
* regenerated. */
|
8
|
+
|
9
|
+
#include <stddef.h>
|
10
|
+
#include "upb/msg.h"
|
11
|
+
#include "src/proto/grpc/lb/v1/load_balancer.upb.h"
|
12
|
+
#include "google/protobuf/duration.upb.h"
|
13
|
+
#include "google/protobuf/timestamp.upb.h"
|
14
|
+
|
15
|
+
#include "upb/port_def.inc"
|
16
|
+
|
17
|
+
static const upb_msglayout *const grpc_lb_v1_LoadBalanceRequest_submsgs[2] = {
|
18
|
+
&grpc_lb_v1_ClientStats_msginit,
|
19
|
+
&grpc_lb_v1_InitialLoadBalanceRequest_msginit,
|
20
|
+
};
|
21
|
+
|
22
|
+
static const upb_msglayout_field grpc_lb_v1_LoadBalanceRequest__fields[2] = {
|
23
|
+
{1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1},
|
24
|
+
{2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1},
|
25
|
+
};
|
26
|
+
|
27
|
+
const upb_msglayout grpc_lb_v1_LoadBalanceRequest_msginit = {
|
28
|
+
&grpc_lb_v1_LoadBalanceRequest_submsgs[0],
|
29
|
+
&grpc_lb_v1_LoadBalanceRequest__fields[0],
|
30
|
+
UPB_SIZE(8, 16), 2, false,
|
31
|
+
};
|
32
|
+
|
33
|
+
static const upb_msglayout_field grpc_lb_v1_InitialLoadBalanceRequest__fields[1] = {
|
34
|
+
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
|
35
|
+
};
|
36
|
+
|
37
|
+
const upb_msglayout grpc_lb_v1_InitialLoadBalanceRequest_msginit = {
|
38
|
+
NULL,
|
39
|
+
&grpc_lb_v1_InitialLoadBalanceRequest__fields[0],
|
40
|
+
UPB_SIZE(8, 16), 1, false,
|
41
|
+
};
|
42
|
+
|
43
|
+
static const upb_msglayout_field grpc_lb_v1_ClientStatsPerToken__fields[2] = {
|
44
|
+
{1, UPB_SIZE(8, 8), 0, 0, 9, 1},
|
45
|
+
{2, UPB_SIZE(0, 0), 0, 0, 3, 1},
|
46
|
+
};
|
47
|
+
|
48
|
+
const upb_msglayout grpc_lb_v1_ClientStatsPerToken_msginit = {
|
49
|
+
NULL,
|
50
|
+
&grpc_lb_v1_ClientStatsPerToken__fields[0],
|
51
|
+
UPB_SIZE(16, 32), 2, false,
|
52
|
+
};
|
53
|
+
|
54
|
+
static const upb_msglayout *const grpc_lb_v1_ClientStats_submsgs[2] = {
|
55
|
+
&google_protobuf_Timestamp_msginit,
|
56
|
+
&grpc_lb_v1_ClientStatsPerToken_msginit,
|
57
|
+
};
|
58
|
+
|
59
|
+
static const upb_msglayout_field grpc_lb_v1_ClientStats__fields[6] = {
|
60
|
+
{1, UPB_SIZE(32, 32), 0, 0, 11, 1},
|
61
|
+
{2, UPB_SIZE(0, 0), 0, 0, 3, 1},
|
62
|
+
{3, UPB_SIZE(8, 8), 0, 0, 3, 1},
|
63
|
+
{6, UPB_SIZE(16, 16), 0, 0, 3, 1},
|
64
|
+
{7, UPB_SIZE(24, 24), 0, 0, 3, 1},
|
65
|
+
{8, UPB_SIZE(36, 40), 0, 1, 11, 3},
|
66
|
+
};
|
67
|
+
|
68
|
+
const upb_msglayout grpc_lb_v1_ClientStats_msginit = {
|
69
|
+
&grpc_lb_v1_ClientStats_submsgs[0],
|
70
|
+
&grpc_lb_v1_ClientStats__fields[0],
|
71
|
+
UPB_SIZE(40, 48), 6, false,
|
72
|
+
};
|
73
|
+
|
74
|
+
static const upb_msglayout *const grpc_lb_v1_LoadBalanceResponse_submsgs[2] = {
|
75
|
+
&grpc_lb_v1_InitialLoadBalanceResponse_msginit,
|
76
|
+
&grpc_lb_v1_ServerList_msginit,
|
77
|
+
};
|
78
|
+
|
79
|
+
static const upb_msglayout_field grpc_lb_v1_LoadBalanceResponse__fields[2] = {
|
80
|
+
{1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1},
|
81
|
+
{2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1},
|
82
|
+
};
|
83
|
+
|
84
|
+
const upb_msglayout grpc_lb_v1_LoadBalanceResponse_msginit = {
|
85
|
+
&grpc_lb_v1_LoadBalanceResponse_submsgs[0],
|
86
|
+
&grpc_lb_v1_LoadBalanceResponse__fields[0],
|
87
|
+
UPB_SIZE(8, 16), 2, false,
|
88
|
+
};
|
89
|
+
|
90
|
+
static const upb_msglayout *const grpc_lb_v1_InitialLoadBalanceResponse_submsgs[1] = {
|
91
|
+
&google_protobuf_Duration_msginit,
|
92
|
+
};
|
93
|
+
|
94
|
+
static const upb_msglayout_field grpc_lb_v1_InitialLoadBalanceResponse__fields[2] = {
|
95
|
+
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
|
96
|
+
{2, UPB_SIZE(8, 16), 0, 0, 11, 1},
|
97
|
+
};
|
98
|
+
|
99
|
+
const upb_msglayout grpc_lb_v1_InitialLoadBalanceResponse_msginit = {
|
100
|
+
&grpc_lb_v1_InitialLoadBalanceResponse_submsgs[0],
|
101
|
+
&grpc_lb_v1_InitialLoadBalanceResponse__fields[0],
|
102
|
+
UPB_SIZE(16, 32), 2, false,
|
103
|
+
};
|
104
|
+
|
105
|
+
static const upb_msglayout *const grpc_lb_v1_ServerList_submsgs[1] = {
|
106
|
+
&grpc_lb_v1_Server_msginit,
|
107
|
+
};
|
108
|
+
|
109
|
+
static const upb_msglayout_field grpc_lb_v1_ServerList__fields[1] = {
|
110
|
+
{1, UPB_SIZE(0, 0), 0, 0, 11, 3},
|
111
|
+
};
|
112
|
+
|
113
|
+
const upb_msglayout grpc_lb_v1_ServerList_msginit = {
|
114
|
+
&grpc_lb_v1_ServerList_submsgs[0],
|
115
|
+
&grpc_lb_v1_ServerList__fields[0],
|
116
|
+
UPB_SIZE(4, 8), 1, false,
|
117
|
+
};
|
118
|
+
|
119
|
+
static const upb_msglayout_field grpc_lb_v1_Server__fields[4] = {
|
120
|
+
{1, UPB_SIZE(8, 8), 0, 0, 12, 1},
|
121
|
+
{2, UPB_SIZE(0, 0), 0, 0, 5, 1},
|
122
|
+
{3, UPB_SIZE(16, 24), 0, 0, 9, 1},
|
123
|
+
{4, UPB_SIZE(4, 4), 0, 0, 8, 1},
|
124
|
+
};
|
125
|
+
|
126
|
+
const upb_msglayout grpc_lb_v1_Server_msginit = {
|
127
|
+
NULL,
|
128
|
+
&grpc_lb_v1_Server__fields[0],
|
129
|
+
UPB_SIZE(24, 48), 4, false,
|
130
|
+
};
|
131
|
+
|
132
|
+
#include "upb/port_undef.inc"
|
133
|
+
|
@@ -0,0 +1,359 @@
|
|
1
|
+
/* This file was generated by upbc (the upb compiler) from the input
|
2
|
+
* file:
|
3
|
+
*
|
4
|
+
* src/proto/grpc/lb/v1/load_balancer.proto
|
5
|
+
*
|
6
|
+
* Do not edit -- your changes will be discarded when the file is
|
7
|
+
* regenerated. */
|
8
|
+
|
9
|
+
#ifndef SRC_PROTO_GRPC_LB_V1_LOAD_BALANCER_PROTO_UPB_H_
|
10
|
+
#define SRC_PROTO_GRPC_LB_V1_LOAD_BALANCER_PROTO_UPB_H_
|
11
|
+
|
12
|
+
#include "upb/generated_util.h"
|
13
|
+
#include "upb/msg.h"
|
14
|
+
#include "upb/decode.h"
|
15
|
+
#include "upb/encode.h"
|
16
|
+
|
17
|
+
#include "upb/port_def.inc"
|
18
|
+
|
19
|
+
#ifdef __cplusplus
|
20
|
+
extern "C" {
|
21
|
+
#endif
|
22
|
+
|
23
|
+
struct grpc_lb_v1_LoadBalanceRequest;
|
24
|
+
struct grpc_lb_v1_InitialLoadBalanceRequest;
|
25
|
+
struct grpc_lb_v1_ClientStatsPerToken;
|
26
|
+
struct grpc_lb_v1_ClientStats;
|
27
|
+
struct grpc_lb_v1_LoadBalanceResponse;
|
28
|
+
struct grpc_lb_v1_InitialLoadBalanceResponse;
|
29
|
+
struct grpc_lb_v1_ServerList;
|
30
|
+
struct grpc_lb_v1_Server;
|
31
|
+
typedef struct grpc_lb_v1_LoadBalanceRequest grpc_lb_v1_LoadBalanceRequest;
|
32
|
+
typedef struct grpc_lb_v1_InitialLoadBalanceRequest grpc_lb_v1_InitialLoadBalanceRequest;
|
33
|
+
typedef struct grpc_lb_v1_ClientStatsPerToken grpc_lb_v1_ClientStatsPerToken;
|
34
|
+
typedef struct grpc_lb_v1_ClientStats grpc_lb_v1_ClientStats;
|
35
|
+
typedef struct grpc_lb_v1_LoadBalanceResponse grpc_lb_v1_LoadBalanceResponse;
|
36
|
+
typedef struct grpc_lb_v1_InitialLoadBalanceResponse grpc_lb_v1_InitialLoadBalanceResponse;
|
37
|
+
typedef struct grpc_lb_v1_ServerList grpc_lb_v1_ServerList;
|
38
|
+
typedef struct grpc_lb_v1_Server grpc_lb_v1_Server;
|
39
|
+
extern const upb_msglayout grpc_lb_v1_LoadBalanceRequest_msginit;
|
40
|
+
extern const upb_msglayout grpc_lb_v1_InitialLoadBalanceRequest_msginit;
|
41
|
+
extern const upb_msglayout grpc_lb_v1_ClientStatsPerToken_msginit;
|
42
|
+
extern const upb_msglayout grpc_lb_v1_ClientStats_msginit;
|
43
|
+
extern const upb_msglayout grpc_lb_v1_LoadBalanceResponse_msginit;
|
44
|
+
extern const upb_msglayout grpc_lb_v1_InitialLoadBalanceResponse_msginit;
|
45
|
+
extern const upb_msglayout grpc_lb_v1_ServerList_msginit;
|
46
|
+
extern const upb_msglayout grpc_lb_v1_Server_msginit;
|
47
|
+
struct google_protobuf_Duration;
|
48
|
+
struct google_protobuf_Timestamp;
|
49
|
+
extern const upb_msglayout google_protobuf_Duration_msginit;
|
50
|
+
extern const upb_msglayout google_protobuf_Timestamp_msginit;
|
51
|
+
|
52
|
+
|
53
|
+
/* grpc.lb.v1.LoadBalanceRequest */
|
54
|
+
|
55
|
+
UPB_INLINE grpc_lb_v1_LoadBalanceRequest *grpc_lb_v1_LoadBalanceRequest_new(upb_arena *arena) {
|
56
|
+
return (grpc_lb_v1_LoadBalanceRequest *)upb_msg_new(&grpc_lb_v1_LoadBalanceRequest_msginit, arena);
|
57
|
+
}
|
58
|
+
UPB_INLINE grpc_lb_v1_LoadBalanceRequest *grpc_lb_v1_LoadBalanceRequest_parse(const char *buf, size_t size,
|
59
|
+
upb_arena *arena) {
|
60
|
+
grpc_lb_v1_LoadBalanceRequest *ret = grpc_lb_v1_LoadBalanceRequest_new(arena);
|
61
|
+
return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_LoadBalanceRequest_msginit, arena)) ? ret : NULL;
|
62
|
+
}
|
63
|
+
UPB_INLINE char *grpc_lb_v1_LoadBalanceRequest_serialize(const grpc_lb_v1_LoadBalanceRequest *msg, upb_arena *arena, size_t *len) {
|
64
|
+
return upb_encode(msg, &grpc_lb_v1_LoadBalanceRequest_msginit, arena, len);
|
65
|
+
}
|
66
|
+
|
67
|
+
typedef enum {
|
68
|
+
grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_initial_request = 1,
|
69
|
+
grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_client_stats = 2,
|
70
|
+
grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_NOT_SET = 0
|
71
|
+
} grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_oneofcases;
|
72
|
+
UPB_INLINE grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_oneofcases grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_case(const grpc_lb_v1_LoadBalanceRequest* msg) { return (grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); }
|
73
|
+
|
74
|
+
UPB_INLINE bool grpc_lb_v1_LoadBalanceRequest_has_initial_request(const grpc_lb_v1_LoadBalanceRequest *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); }
|
75
|
+
UPB_INLINE const grpc_lb_v1_InitialLoadBalanceRequest* grpc_lb_v1_LoadBalanceRequest_initial_request(const grpc_lb_v1_LoadBalanceRequest *msg) { return UPB_READ_ONEOF(msg, const grpc_lb_v1_InitialLoadBalanceRequest*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); }
|
76
|
+
UPB_INLINE bool grpc_lb_v1_LoadBalanceRequest_has_client_stats(const grpc_lb_v1_LoadBalanceRequest *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); }
|
77
|
+
UPB_INLINE const grpc_lb_v1_ClientStats* grpc_lb_v1_LoadBalanceRequest_client_stats(const grpc_lb_v1_LoadBalanceRequest *msg) { return UPB_READ_ONEOF(msg, const grpc_lb_v1_ClientStats*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); }
|
78
|
+
|
79
|
+
UPB_INLINE void grpc_lb_v1_LoadBalanceRequest_set_initial_request(grpc_lb_v1_LoadBalanceRequest *msg, grpc_lb_v1_InitialLoadBalanceRequest* value) {
|
80
|
+
UPB_WRITE_ONEOF(msg, grpc_lb_v1_InitialLoadBalanceRequest*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
|
81
|
+
}
|
82
|
+
UPB_INLINE struct grpc_lb_v1_InitialLoadBalanceRequest* grpc_lb_v1_LoadBalanceRequest_mutable_initial_request(grpc_lb_v1_LoadBalanceRequest *msg, upb_arena *arena) {
|
83
|
+
struct grpc_lb_v1_InitialLoadBalanceRequest* sub = (struct grpc_lb_v1_InitialLoadBalanceRequest*)grpc_lb_v1_LoadBalanceRequest_initial_request(msg);
|
84
|
+
if (sub == NULL) {
|
85
|
+
sub = (struct grpc_lb_v1_InitialLoadBalanceRequest*)upb_msg_new(&grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena);
|
86
|
+
if (!sub) return NULL;
|
87
|
+
grpc_lb_v1_LoadBalanceRequest_set_initial_request(msg, sub);
|
88
|
+
}
|
89
|
+
return sub;
|
90
|
+
}
|
91
|
+
UPB_INLINE void grpc_lb_v1_LoadBalanceRequest_set_client_stats(grpc_lb_v1_LoadBalanceRequest *msg, grpc_lb_v1_ClientStats* value) {
|
92
|
+
UPB_WRITE_ONEOF(msg, grpc_lb_v1_ClientStats*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
|
93
|
+
}
|
94
|
+
UPB_INLINE struct grpc_lb_v1_ClientStats* grpc_lb_v1_LoadBalanceRequest_mutable_client_stats(grpc_lb_v1_LoadBalanceRequest *msg, upb_arena *arena) {
|
95
|
+
struct grpc_lb_v1_ClientStats* sub = (struct grpc_lb_v1_ClientStats*)grpc_lb_v1_LoadBalanceRequest_client_stats(msg);
|
96
|
+
if (sub == NULL) {
|
97
|
+
sub = (struct grpc_lb_v1_ClientStats*)upb_msg_new(&grpc_lb_v1_ClientStats_msginit, arena);
|
98
|
+
if (!sub) return NULL;
|
99
|
+
grpc_lb_v1_LoadBalanceRequest_set_client_stats(msg, sub);
|
100
|
+
}
|
101
|
+
return sub;
|
102
|
+
}
|
103
|
+
|
104
|
+
/* grpc.lb.v1.InitialLoadBalanceRequest */
|
105
|
+
|
106
|
+
UPB_INLINE grpc_lb_v1_InitialLoadBalanceRequest *grpc_lb_v1_InitialLoadBalanceRequest_new(upb_arena *arena) {
|
107
|
+
return (grpc_lb_v1_InitialLoadBalanceRequest *)upb_msg_new(&grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena);
|
108
|
+
}
|
109
|
+
UPB_INLINE grpc_lb_v1_InitialLoadBalanceRequest *grpc_lb_v1_InitialLoadBalanceRequest_parse(const char *buf, size_t size,
|
110
|
+
upb_arena *arena) {
|
111
|
+
grpc_lb_v1_InitialLoadBalanceRequest *ret = grpc_lb_v1_InitialLoadBalanceRequest_new(arena);
|
112
|
+
return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena)) ? ret : NULL;
|
113
|
+
}
|
114
|
+
UPB_INLINE char *grpc_lb_v1_InitialLoadBalanceRequest_serialize(const grpc_lb_v1_InitialLoadBalanceRequest *msg, upb_arena *arena, size_t *len) {
|
115
|
+
return upb_encode(msg, &grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena, len);
|
116
|
+
}
|
117
|
+
|
118
|
+
UPB_INLINE upb_strview grpc_lb_v1_InitialLoadBalanceRequest_name(const grpc_lb_v1_InitialLoadBalanceRequest *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
|
119
|
+
|
120
|
+
UPB_INLINE void grpc_lb_v1_InitialLoadBalanceRequest_set_name(grpc_lb_v1_InitialLoadBalanceRequest *msg, upb_strview value) {
|
121
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
|
122
|
+
}
|
123
|
+
|
124
|
+
/* grpc.lb.v1.ClientStatsPerToken */
|
125
|
+
|
126
|
+
UPB_INLINE grpc_lb_v1_ClientStatsPerToken *grpc_lb_v1_ClientStatsPerToken_new(upb_arena *arena) {
|
127
|
+
return (grpc_lb_v1_ClientStatsPerToken *)upb_msg_new(&grpc_lb_v1_ClientStatsPerToken_msginit, arena);
|
128
|
+
}
|
129
|
+
UPB_INLINE grpc_lb_v1_ClientStatsPerToken *grpc_lb_v1_ClientStatsPerToken_parse(const char *buf, size_t size,
|
130
|
+
upb_arena *arena) {
|
131
|
+
grpc_lb_v1_ClientStatsPerToken *ret = grpc_lb_v1_ClientStatsPerToken_new(arena);
|
132
|
+
return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_ClientStatsPerToken_msginit, arena)) ? ret : NULL;
|
133
|
+
}
|
134
|
+
UPB_INLINE char *grpc_lb_v1_ClientStatsPerToken_serialize(const grpc_lb_v1_ClientStatsPerToken *msg, upb_arena *arena, size_t *len) {
|
135
|
+
return upb_encode(msg, &grpc_lb_v1_ClientStatsPerToken_msginit, arena, len);
|
136
|
+
}
|
137
|
+
|
138
|
+
UPB_INLINE upb_strview grpc_lb_v1_ClientStatsPerToken_load_balance_token(const grpc_lb_v1_ClientStatsPerToken *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); }
|
139
|
+
UPB_INLINE int64_t grpc_lb_v1_ClientStatsPerToken_num_calls(const grpc_lb_v1_ClientStatsPerToken *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); }
|
140
|
+
|
141
|
+
UPB_INLINE void grpc_lb_v1_ClientStatsPerToken_set_load_balance_token(grpc_lb_v1_ClientStatsPerToken *msg, upb_strview value) {
|
142
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value;
|
143
|
+
}
|
144
|
+
UPB_INLINE void grpc_lb_v1_ClientStatsPerToken_set_num_calls(grpc_lb_v1_ClientStatsPerToken *msg, int64_t value) {
|
145
|
+
UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value;
|
146
|
+
}
|
147
|
+
|
148
|
+
/* grpc.lb.v1.ClientStats */
|
149
|
+
|
150
|
+
UPB_INLINE grpc_lb_v1_ClientStats *grpc_lb_v1_ClientStats_new(upb_arena *arena) {
|
151
|
+
return (grpc_lb_v1_ClientStats *)upb_msg_new(&grpc_lb_v1_ClientStats_msginit, arena);
|
152
|
+
}
|
153
|
+
UPB_INLINE grpc_lb_v1_ClientStats *grpc_lb_v1_ClientStats_parse(const char *buf, size_t size,
|
154
|
+
upb_arena *arena) {
|
155
|
+
grpc_lb_v1_ClientStats *ret = grpc_lb_v1_ClientStats_new(arena);
|
156
|
+
return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_ClientStats_msginit, arena)) ? ret : NULL;
|
157
|
+
}
|
158
|
+
UPB_INLINE char *grpc_lb_v1_ClientStats_serialize(const grpc_lb_v1_ClientStats *msg, upb_arena *arena, size_t *len) {
|
159
|
+
return upb_encode(msg, &grpc_lb_v1_ClientStats_msginit, arena, len);
|
160
|
+
}
|
161
|
+
|
162
|
+
UPB_INLINE const struct google_protobuf_Timestamp* grpc_lb_v1_ClientStats_timestamp(const grpc_lb_v1_ClientStats *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Timestamp*, UPB_SIZE(32, 32)); }
|
163
|
+
UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_started(const grpc_lb_v1_ClientStats *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); }
|
164
|
+
UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_finished(const grpc_lb_v1_ClientStats *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)); }
|
165
|
+
UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_finished_with_client_failed_to_send(const grpc_lb_v1_ClientStats *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)); }
|
166
|
+
UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_finished_known_received(const grpc_lb_v1_ClientStats *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(24, 24)); }
|
167
|
+
UPB_INLINE const grpc_lb_v1_ClientStatsPerToken* const* grpc_lb_v1_ClientStats_calls_finished_with_drop(const grpc_lb_v1_ClientStats *msg, size_t *len) { return (const grpc_lb_v1_ClientStatsPerToken* const*)_upb_array_accessor(msg, UPB_SIZE(36, 40), len); }
|
168
|
+
|
169
|
+
UPB_INLINE void grpc_lb_v1_ClientStats_set_timestamp(grpc_lb_v1_ClientStats *msg, struct google_protobuf_Timestamp* value) {
|
170
|
+
UPB_FIELD_AT(msg, struct google_protobuf_Timestamp*, UPB_SIZE(32, 32)) = value;
|
171
|
+
}
|
172
|
+
UPB_INLINE struct google_protobuf_Timestamp* grpc_lb_v1_ClientStats_mutable_timestamp(grpc_lb_v1_ClientStats *msg, upb_arena *arena) {
|
173
|
+
struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)grpc_lb_v1_ClientStats_timestamp(msg);
|
174
|
+
if (sub == NULL) {
|
175
|
+
sub = (struct google_protobuf_Timestamp*)upb_msg_new(&google_protobuf_Timestamp_msginit, arena);
|
176
|
+
if (!sub) return NULL;
|
177
|
+
grpc_lb_v1_ClientStats_set_timestamp(msg, sub);
|
178
|
+
}
|
179
|
+
return sub;
|
180
|
+
}
|
181
|
+
UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_started(grpc_lb_v1_ClientStats *msg, int64_t value) {
|
182
|
+
UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value;
|
183
|
+
}
|
184
|
+
UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_finished(grpc_lb_v1_ClientStats *msg, int64_t value) {
|
185
|
+
UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)) = value;
|
186
|
+
}
|
187
|
+
UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_finished_with_client_failed_to_send(grpc_lb_v1_ClientStats *msg, int64_t value) {
|
188
|
+
UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)) = value;
|
189
|
+
}
|
190
|
+
UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_finished_known_received(grpc_lb_v1_ClientStats *msg, int64_t value) {
|
191
|
+
UPB_FIELD_AT(msg, int64_t, UPB_SIZE(24, 24)) = value;
|
192
|
+
}
|
193
|
+
UPB_INLINE grpc_lb_v1_ClientStatsPerToken** grpc_lb_v1_ClientStats_mutable_calls_finished_with_drop(grpc_lb_v1_ClientStats *msg, size_t *len) {
|
194
|
+
return (grpc_lb_v1_ClientStatsPerToken**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 40), len);
|
195
|
+
}
|
196
|
+
UPB_INLINE grpc_lb_v1_ClientStatsPerToken** grpc_lb_v1_ClientStats_resize_calls_finished_with_drop(grpc_lb_v1_ClientStats *msg, size_t len, upb_arena *arena) {
|
197
|
+
return (grpc_lb_v1_ClientStatsPerToken**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 40), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
198
|
+
}
|
199
|
+
UPB_INLINE struct grpc_lb_v1_ClientStatsPerToken* grpc_lb_v1_ClientStats_add_calls_finished_with_drop(grpc_lb_v1_ClientStats *msg, upb_arena *arena) {
|
200
|
+
struct grpc_lb_v1_ClientStatsPerToken* sub = (struct grpc_lb_v1_ClientStatsPerToken*)upb_msg_new(&grpc_lb_v1_ClientStatsPerToken_msginit, arena);
|
201
|
+
bool ok = _upb_array_append_accessor(
|
202
|
+
msg, UPB_SIZE(36, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
203
|
+
if (!ok) return NULL;
|
204
|
+
return sub;
|
205
|
+
}
|
206
|
+
|
207
|
+
/* grpc.lb.v1.LoadBalanceResponse */
|
208
|
+
|
209
|
+
UPB_INLINE grpc_lb_v1_LoadBalanceResponse *grpc_lb_v1_LoadBalanceResponse_new(upb_arena *arena) {
|
210
|
+
return (grpc_lb_v1_LoadBalanceResponse *)upb_msg_new(&grpc_lb_v1_LoadBalanceResponse_msginit, arena);
|
211
|
+
}
|
212
|
+
UPB_INLINE grpc_lb_v1_LoadBalanceResponse *grpc_lb_v1_LoadBalanceResponse_parse(const char *buf, size_t size,
|
213
|
+
upb_arena *arena) {
|
214
|
+
grpc_lb_v1_LoadBalanceResponse *ret = grpc_lb_v1_LoadBalanceResponse_new(arena);
|
215
|
+
return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_LoadBalanceResponse_msginit, arena)) ? ret : NULL;
|
216
|
+
}
|
217
|
+
UPB_INLINE char *grpc_lb_v1_LoadBalanceResponse_serialize(const grpc_lb_v1_LoadBalanceResponse *msg, upb_arena *arena, size_t *len) {
|
218
|
+
return upb_encode(msg, &grpc_lb_v1_LoadBalanceResponse_msginit, arena, len);
|
219
|
+
}
|
220
|
+
|
221
|
+
typedef enum {
|
222
|
+
grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_initial_response = 1,
|
223
|
+
grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_server_list = 2,
|
224
|
+
grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_NOT_SET = 0
|
225
|
+
} grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_oneofcases;
|
226
|
+
UPB_INLINE grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_oneofcases grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_case(const grpc_lb_v1_LoadBalanceResponse* msg) { return (grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); }
|
227
|
+
|
228
|
+
UPB_INLINE bool grpc_lb_v1_LoadBalanceResponse_has_initial_response(const grpc_lb_v1_LoadBalanceResponse *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); }
|
229
|
+
UPB_INLINE const grpc_lb_v1_InitialLoadBalanceResponse* grpc_lb_v1_LoadBalanceResponse_initial_response(const grpc_lb_v1_LoadBalanceResponse *msg) { return UPB_READ_ONEOF(msg, const grpc_lb_v1_InitialLoadBalanceResponse*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); }
|
230
|
+
UPB_INLINE bool grpc_lb_v1_LoadBalanceResponse_has_server_list(const grpc_lb_v1_LoadBalanceResponse *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); }
|
231
|
+
UPB_INLINE const grpc_lb_v1_ServerList* grpc_lb_v1_LoadBalanceResponse_server_list(const grpc_lb_v1_LoadBalanceResponse *msg) { return UPB_READ_ONEOF(msg, const grpc_lb_v1_ServerList*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); }
|
232
|
+
|
233
|
+
UPB_INLINE void grpc_lb_v1_LoadBalanceResponse_set_initial_response(grpc_lb_v1_LoadBalanceResponse *msg, grpc_lb_v1_InitialLoadBalanceResponse* value) {
|
234
|
+
UPB_WRITE_ONEOF(msg, grpc_lb_v1_InitialLoadBalanceResponse*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
|
235
|
+
}
|
236
|
+
UPB_INLINE struct grpc_lb_v1_InitialLoadBalanceResponse* grpc_lb_v1_LoadBalanceResponse_mutable_initial_response(grpc_lb_v1_LoadBalanceResponse *msg, upb_arena *arena) {
|
237
|
+
struct grpc_lb_v1_InitialLoadBalanceResponse* sub = (struct grpc_lb_v1_InitialLoadBalanceResponse*)grpc_lb_v1_LoadBalanceResponse_initial_response(msg);
|
238
|
+
if (sub == NULL) {
|
239
|
+
sub = (struct grpc_lb_v1_InitialLoadBalanceResponse*)upb_msg_new(&grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena);
|
240
|
+
if (!sub) return NULL;
|
241
|
+
grpc_lb_v1_LoadBalanceResponse_set_initial_response(msg, sub);
|
242
|
+
}
|
243
|
+
return sub;
|
244
|
+
}
|
245
|
+
UPB_INLINE void grpc_lb_v1_LoadBalanceResponse_set_server_list(grpc_lb_v1_LoadBalanceResponse *msg, grpc_lb_v1_ServerList* value) {
|
246
|
+
UPB_WRITE_ONEOF(msg, grpc_lb_v1_ServerList*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
|
247
|
+
}
|
248
|
+
UPB_INLINE struct grpc_lb_v1_ServerList* grpc_lb_v1_LoadBalanceResponse_mutable_server_list(grpc_lb_v1_LoadBalanceResponse *msg, upb_arena *arena) {
|
249
|
+
struct grpc_lb_v1_ServerList* sub = (struct grpc_lb_v1_ServerList*)grpc_lb_v1_LoadBalanceResponse_server_list(msg);
|
250
|
+
if (sub == NULL) {
|
251
|
+
sub = (struct grpc_lb_v1_ServerList*)upb_msg_new(&grpc_lb_v1_ServerList_msginit, arena);
|
252
|
+
if (!sub) return NULL;
|
253
|
+
grpc_lb_v1_LoadBalanceResponse_set_server_list(msg, sub);
|
254
|
+
}
|
255
|
+
return sub;
|
256
|
+
}
|
257
|
+
|
258
|
+
/* grpc.lb.v1.InitialLoadBalanceResponse */
|
259
|
+
|
260
|
+
UPB_INLINE grpc_lb_v1_InitialLoadBalanceResponse *grpc_lb_v1_InitialLoadBalanceResponse_new(upb_arena *arena) {
|
261
|
+
return (grpc_lb_v1_InitialLoadBalanceResponse *)upb_msg_new(&grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena);
|
262
|
+
}
|
263
|
+
UPB_INLINE grpc_lb_v1_InitialLoadBalanceResponse *grpc_lb_v1_InitialLoadBalanceResponse_parse(const char *buf, size_t size,
|
264
|
+
upb_arena *arena) {
|
265
|
+
grpc_lb_v1_InitialLoadBalanceResponse *ret = grpc_lb_v1_InitialLoadBalanceResponse_new(arena);
|
266
|
+
return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena)) ? ret : NULL;
|
267
|
+
}
|
268
|
+
UPB_INLINE char *grpc_lb_v1_InitialLoadBalanceResponse_serialize(const grpc_lb_v1_InitialLoadBalanceResponse *msg, upb_arena *arena, size_t *len) {
|
269
|
+
return upb_encode(msg, &grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena, len);
|
270
|
+
}
|
271
|
+
|
272
|
+
UPB_INLINE upb_strview grpc_lb_v1_InitialLoadBalanceResponse_load_balancer_delegate(const grpc_lb_v1_InitialLoadBalanceResponse *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
|
273
|
+
UPB_INLINE const struct google_protobuf_Duration* grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval(const grpc_lb_v1_InitialLoadBalanceResponse *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 16)); }
|
274
|
+
|
275
|
+
UPB_INLINE void grpc_lb_v1_InitialLoadBalanceResponse_set_load_balancer_delegate(grpc_lb_v1_InitialLoadBalanceResponse *msg, upb_strview value) {
|
276
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
|
277
|
+
}
|
278
|
+
UPB_INLINE void grpc_lb_v1_InitialLoadBalanceResponse_set_client_stats_report_interval(grpc_lb_v1_InitialLoadBalanceResponse *msg, struct google_protobuf_Duration* value) {
|
279
|
+
UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 16)) = value;
|
280
|
+
}
|
281
|
+
UPB_INLINE struct google_protobuf_Duration* grpc_lb_v1_InitialLoadBalanceResponse_mutable_client_stats_report_interval(grpc_lb_v1_InitialLoadBalanceResponse *msg, upb_arena *arena) {
|
282
|
+
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval(msg);
|
283
|
+
if (sub == NULL) {
|
284
|
+
sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena);
|
285
|
+
if (!sub) return NULL;
|
286
|
+
grpc_lb_v1_InitialLoadBalanceResponse_set_client_stats_report_interval(msg, sub);
|
287
|
+
}
|
288
|
+
return sub;
|
289
|
+
}
|
290
|
+
|
291
|
+
/* grpc.lb.v1.ServerList */
|
292
|
+
|
293
|
+
UPB_INLINE grpc_lb_v1_ServerList *grpc_lb_v1_ServerList_new(upb_arena *arena) {
|
294
|
+
return (grpc_lb_v1_ServerList *)upb_msg_new(&grpc_lb_v1_ServerList_msginit, arena);
|
295
|
+
}
|
296
|
+
UPB_INLINE grpc_lb_v1_ServerList *grpc_lb_v1_ServerList_parse(const char *buf, size_t size,
|
297
|
+
upb_arena *arena) {
|
298
|
+
grpc_lb_v1_ServerList *ret = grpc_lb_v1_ServerList_new(arena);
|
299
|
+
return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_ServerList_msginit, arena)) ? ret : NULL;
|
300
|
+
}
|
301
|
+
UPB_INLINE char *grpc_lb_v1_ServerList_serialize(const grpc_lb_v1_ServerList *msg, upb_arena *arena, size_t *len) {
|
302
|
+
return upb_encode(msg, &grpc_lb_v1_ServerList_msginit, arena, len);
|
303
|
+
}
|
304
|
+
|
305
|
+
UPB_INLINE const grpc_lb_v1_Server* const* grpc_lb_v1_ServerList_servers(const grpc_lb_v1_ServerList *msg, size_t *len) { return (const grpc_lb_v1_Server* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
|
306
|
+
|
307
|
+
UPB_INLINE grpc_lb_v1_Server** grpc_lb_v1_ServerList_mutable_servers(grpc_lb_v1_ServerList *msg, size_t *len) {
|
308
|
+
return (grpc_lb_v1_Server**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
|
309
|
+
}
|
310
|
+
UPB_INLINE grpc_lb_v1_Server** grpc_lb_v1_ServerList_resize_servers(grpc_lb_v1_ServerList *msg, size_t len, upb_arena *arena) {
|
311
|
+
return (grpc_lb_v1_Server**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
|
312
|
+
}
|
313
|
+
UPB_INLINE struct grpc_lb_v1_Server* grpc_lb_v1_ServerList_add_servers(grpc_lb_v1_ServerList *msg, upb_arena *arena) {
|
314
|
+
struct grpc_lb_v1_Server* sub = (struct grpc_lb_v1_Server*)upb_msg_new(&grpc_lb_v1_Server_msginit, arena);
|
315
|
+
bool ok = _upb_array_append_accessor(
|
316
|
+
msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
|
317
|
+
if (!ok) return NULL;
|
318
|
+
return sub;
|
319
|
+
}
|
320
|
+
|
321
|
+
/* grpc.lb.v1.Server */
|
322
|
+
|
323
|
+
UPB_INLINE grpc_lb_v1_Server *grpc_lb_v1_Server_new(upb_arena *arena) {
|
324
|
+
return (grpc_lb_v1_Server *)upb_msg_new(&grpc_lb_v1_Server_msginit, arena);
|
325
|
+
}
|
326
|
+
UPB_INLINE grpc_lb_v1_Server *grpc_lb_v1_Server_parse(const char *buf, size_t size,
|
327
|
+
upb_arena *arena) {
|
328
|
+
grpc_lb_v1_Server *ret = grpc_lb_v1_Server_new(arena);
|
329
|
+
return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_Server_msginit, arena)) ? ret : NULL;
|
330
|
+
}
|
331
|
+
UPB_INLINE char *grpc_lb_v1_Server_serialize(const grpc_lb_v1_Server *msg, upb_arena *arena, size_t *len) {
|
332
|
+
return upb_encode(msg, &grpc_lb_v1_Server_msginit, arena, len);
|
333
|
+
}
|
334
|
+
|
335
|
+
UPB_INLINE upb_strview grpc_lb_v1_Server_ip_address(const grpc_lb_v1_Server *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); }
|
336
|
+
UPB_INLINE int32_t grpc_lb_v1_Server_port(const grpc_lb_v1_Server *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); }
|
337
|
+
UPB_INLINE upb_strview grpc_lb_v1_Server_load_balance_token(const grpc_lb_v1_Server *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 24)); }
|
338
|
+
UPB_INLINE bool grpc_lb_v1_Server_drop(const grpc_lb_v1_Server *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)); }
|
339
|
+
|
340
|
+
UPB_INLINE void grpc_lb_v1_Server_set_ip_address(grpc_lb_v1_Server *msg, upb_strview value) {
|
341
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value;
|
342
|
+
}
|
343
|
+
UPB_INLINE void grpc_lb_v1_Server_set_port(grpc_lb_v1_Server *msg, int32_t value) {
|
344
|
+
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value;
|
345
|
+
}
|
346
|
+
UPB_INLINE void grpc_lb_v1_Server_set_load_balance_token(grpc_lb_v1_Server *msg, upb_strview value) {
|
347
|
+
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 24)) = value;
|
348
|
+
}
|
349
|
+
UPB_INLINE void grpc_lb_v1_Server_set_drop(grpc_lb_v1_Server *msg, bool value) {
|
350
|
+
UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)) = value;
|
351
|
+
}
|
352
|
+
|
353
|
+
#ifdef __cplusplus
|
354
|
+
} /* extern "C" */
|
355
|
+
#endif
|
356
|
+
|
357
|
+
#include "upb/port_undef.inc"
|
358
|
+
|
359
|
+
#endif /* SRC_PROTO_GRPC_LB_V1_LOAD_BALANCER_PROTO_UPB_H_ */
|