xds_cluster.cc
Go to the documentation of this file.
1 //
2 // Copyright 2018 gRPC authors.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
18 
20 
21 #include <stddef.h>
22 
23 #include <type_traits>
24 #include <utility>
25 
26 #include "absl/memory/memory.h"
27 #include "absl/status/status.h"
28 #include "absl/strings/str_cat.h"
29 #include "absl/strings/str_format.h"
30 #include "absl/strings/str_join.h"
45 #include "upb/text_encode.h"
46 #include "upb/upb.h"
47 
48 #include <grpc/support/log.h>
49 
56 
57 namespace grpc_core {
58 
59 //
60 // XdsClusterResource
61 //
62 
64  std::vector<std::string> contents;
65  switch (cluster_type) {
66  case EDS:
67  contents.push_back("cluster_type=EDS");
68  if (!eds_service_name.empty()) {
69  contents.push_back(
70  absl::StrFormat("eds_service_name=%s", eds_service_name));
71  }
72  break;
73  case LOGICAL_DNS:
74  contents.push_back("cluster_type=LOGICAL_DNS");
75  contents.push_back(absl::StrFormat("dns_hostname=%s", dns_hostname));
76  break;
77  case AGGREGATE:
78  contents.push_back("cluster_type=AGGREGATE");
79  contents.push_back(
80  absl::StrFormat("prioritized_cluster_names=[%s]",
82  }
83  if (!common_tls_context.Empty()) {
84  contents.push_back(absl::StrFormat("common_tls_context=%s",
86  }
87  if (lrs_load_reporting_server.has_value()) {
88  contents.push_back(absl::StrFormat("lrs_load_reporting_server_name=%s",
89  lrs_load_reporting_server->server_uri));
90  }
91  contents.push_back(absl::StrCat("lb_policy=", lb_policy));
92  if (lb_policy == "RING_HASH") {
93  contents.push_back(absl::StrCat("min_ring_size=", min_ring_size));
94  contents.push_back(absl::StrCat("max_ring_size=", max_ring_size));
95  }
96  contents.push_back(
97  absl::StrFormat("max_concurrent_requests=%d", max_concurrent_requests));
98  return absl::StrCat("{", absl::StrJoin(contents, ", "), "}");
99 }
100 
101 //
102 // XdsClusterResourceType
103 //
104 
105 namespace {
106 
107 grpc_error_handle UpstreamTlsContextParse(
109  const envoy_config_core_v3_TransportSocket* transport_socket,
110  CommonTlsContext* common_tls_context) {
111  // Record Upstream tls context
114  if (name != "envoy.transport_sockets.tls") {
116  absl::StrCat("Unrecognized transport socket: ", name));
117  }
118  auto* typed_config =
120  if (typed_config != nullptr) {
121  const upb_StringView encoded_upstream_tls_context =
122  google_protobuf_Any_value(typed_config);
123  auto* upstream_tls_context =
125  encoded_upstream_tls_context.data,
126  encoded_upstream_tls_context.size, context.arena);
127  if (upstream_tls_context == nullptr) {
129  "Can't decode upstream tls context.");
130  }
131  auto* common_tls_context_proto =
133  upstream_tls_context);
134  if (common_tls_context_proto != nullptr) {
136  context, common_tls_context_proto, common_tls_context);
137  if (!GRPC_ERROR_IS_NONE(error)) {
139  "Error parsing UpstreamTlsContext"),
140  error);
141  }
142  }
143  }
144  if (common_tls_context->certificate_validation_context
147  "UpstreamTlsContext: TLS configuration provided but no "
148  "ca_certificate_provider_instance found.");
149  }
150  return GRPC_ERROR_NONE;
151 }
152 
153 grpc_error_handle CdsLogicalDnsParse(
155  XdsClusterResource* cds_update) {
156  const auto* load_assignment =
158  if (load_assignment == nullptr) {
160  "load_assignment not present for LOGICAL_DNS cluster");
161  }
162  size_t num_localities;
163  const auto* const* localities =
165  &num_localities);
166  if (num_localities != 1) {
168  absl::StrCat("load_assignment for LOGICAL_DNS cluster must have "
169  "exactly one locality, found ",
170  num_localities));
171  }
172  size_t num_endpoints;
173  const auto* const* endpoints =
175  &num_endpoints);
176  if (num_endpoints != 1) {
178  absl::StrCat("locality for LOGICAL_DNS cluster must have "
179  "exactly one endpoint, found ",
180  num_endpoints));
181  }
182  const auto* endpoint =
184  if (endpoint == nullptr) {
186  "LbEndpoint endpoint field not set");
187  }
188  const auto* address = envoy_config_endpoint_v3_Endpoint_address(endpoint);
189  if (address == nullptr) {
191  "Endpoint address field not set");
192  }
193  const auto* socket_address =
195  if (socket_address == nullptr) {
197  "Address socket_address field not set");
198  }
200  0) {
202  "LOGICAL_DNS clusters must NOT have a custom resolver name set");
203  }
204  absl::string_view address_str = UpbStringToAbsl(
206  if (address_str.empty()) {
208  "SocketAddress address field not set");
209  }
212  "SocketAddress port_value field not set");
213  }
214  cds_update->dns_hostname = JoinHostPort(
215  address_str,
217  return GRPC_ERROR_NONE;
218 }
219 
220 grpc_error_handle CdsResourceParse(
221  const XdsEncodingContext& context,
222  const envoy_config_cluster_v3_Cluster* cluster, bool /*is_v2*/,
223  XdsClusterResource* cds_update) {
224  std::vector<grpc_error_handle> errors;
225  // Check the cluster_discovery_type.
228  errors.push_back(
229  GRPC_ERROR_CREATE_FROM_STATIC_STRING("DiscoveryType not found."));
232  cds_update->cluster_type = XdsClusterResource::ClusterType::EDS;
233  // Check the EDS config source.
234  const envoy_config_cluster_v3_Cluster_EdsClusterConfig* eds_cluster_config =
236  const envoy_config_core_v3_ConfigSource* eds_config =
238  eds_cluster_config);
242  "EDS ConfigSource is not ADS or SELF."));
243  }
244  // Record EDS service_name (if any).
245  upb_StringView service_name =
247  eds_cluster_config);
248  if (service_name.size != 0) {
249  cds_update->eds_service_name = UpbStringToStdString(service_name);
250  }
253  cds_update->cluster_type = XdsClusterResource::ClusterType::LOGICAL_DNS;
254  grpc_error_handle error = CdsLogicalDnsParse(cluster, cds_update);
255  if (!GRPC_ERROR_IS_NONE(error)) errors.push_back(error);
256  } else {
258  errors.push_back(
259  GRPC_ERROR_CREATE_FROM_STATIC_STRING("DiscoveryType is not valid."));
260  } else {
262  custom_cluster_type =
266  custom_cluster_type);
267  if (UpbStringToAbsl(type_name) != "envoy.clusters.aggregate") {
269  "DiscoveryType is not valid."));
270  } else {
271  cds_update->cluster_type = XdsClusterResource::ClusterType::AGGREGATE;
272  // Retrieve aggregate clusters.
273  const google_protobuf_Any* typed_config =
275  custom_cluster_type);
276  const upb_StringView aggregate_cluster_config_upb_stringview =
277  google_protobuf_Any_value(typed_config);
279  aggregate_cluster_config =
281  aggregate_cluster_config_upb_stringview.data,
282  aggregate_cluster_config_upb_stringview.size,
283  context.arena);
284  if (aggregate_cluster_config == nullptr) {
286  "Can't parse aggregate cluster."));
287  } else {
288  size_t size;
289  const upb_StringView* clusters =
291  aggregate_cluster_config, &size);
292  for (size_t i = 0; i < size; ++i) {
293  const upb_StringView cluster = clusters[i];
294  cds_update->prioritized_cluster_names.emplace_back(
296  }
297  }
298  }
299  }
300  }
301  // Check the LB policy.
304  cds_update->lb_policy = "ROUND_ROBIN";
307  cds_update->lb_policy = "RING_HASH";
308  // Record ring hash lb config
309  auto* ring_hash_config =
311  if (ring_hash_config != nullptr) {
312  const google_protobuf_UInt64Value* max_ring_size =
314  ring_hash_config);
315  if (max_ring_size != nullptr) {
316  cds_update->max_ring_size =
317  google_protobuf_UInt64Value_value(max_ring_size);
318  if (cds_update->max_ring_size > 8388608 ||
319  cds_update->max_ring_size == 0) {
321  "max_ring_size is not in the range of 1 to 8388608."));
322  }
323  }
324  const google_protobuf_UInt64Value* min_ring_size =
326  ring_hash_config);
327  if (min_ring_size != nullptr) {
328  cds_update->min_ring_size =
329  google_protobuf_UInt64Value_value(min_ring_size);
330  if (cds_update->min_ring_size > 8388608 ||
331  cds_update->min_ring_size == 0) {
333  "min_ring_size is not in the range of 1 to 8388608."));
334  }
335  if (cds_update->min_ring_size > cds_update->max_ring_size) {
337  "min_ring_size cannot be greater than max_ring_size."));
338  }
339  }
341  ring_hash_config) !=
344  "ring hash lb config has invalid hash function."));
345  }
346  }
347  } else {
348  errors.push_back(
349  GRPC_ERROR_CREATE_FROM_STATIC_STRING("LB policy is not supported."));
350  }
351  auto* transport_socket =
353  if (transport_socket != nullptr) {
354  grpc_error_handle error = UpstreamTlsContextParse(
355  context, transport_socket, &cds_update->common_tls_context);
356  if (!GRPC_ERROR_IS_NONE(error)) {
357  errors.push_back(
359  "Error parsing security configuration"),
360  error));
361  }
362  }
363  // Record LRS server name (if any).
364  const envoy_config_core_v3_ConfigSource* lrs_server =
366  if (lrs_server != nullptr) {
369  ": LRS ConfigSource is not self."));
370  }
371  cds_update->lrs_load_reporting_server.emplace(context.server);
372  }
373  // The Cluster resource encodes the circuit breaking parameters in a list of
374  // Thresholds messages, where each message specifies the parameters for a
375  // particular RoutingPriority. we will look only at the first entry in the
376  // list for priority DEFAULT and default to 1024 if not found.
378  const envoy_config_cluster_v3_CircuitBreakers* circuit_breakers =
380  size_t num_thresholds;
383  circuit_breakers, &num_thresholds);
384  for (size_t i = 0; i < num_thresholds; ++i) {
385  const auto* threshold = thresholds[i];
387  threshold) == envoy_config_core_v3_DEFAULT) {
388  const google_protobuf_UInt32Value* max_requests =
390  threshold);
391  if (max_requests != nullptr) {
392  cds_update->max_concurrent_requests =
393  google_protobuf_UInt32Value_value(max_requests);
394  }
395  break;
396  }
397  }
398  }
399  // As long as outlier detection field is present in the cluster update,
400  // we will end up with a outlier detection in the cluster resource which will
401  // lead to the creation of outlier detection in discovery mechanism. Values
402  // for outlier detection will be based on fields received and
403  // default values.
406  OutlierDetectionConfig outlier_detection_update;
407  const envoy_config_cluster_v3_OutlierDetection* outlier_detection =
409  const google_protobuf_Duration* duration =
411  if (duration != nullptr) {
412  outlier_detection_update.interval = ParseDuration(duration);
413  }
415  outlier_detection);
416  if (duration != nullptr) {
417  outlier_detection_update.base_ejection_time = ParseDuration(duration);
418  }
420  outlier_detection);
421  if (duration != nullptr) {
422  outlier_detection_update.max_ejection_time = ParseDuration(duration);
423  }
424  const google_protobuf_UInt32Value* max_ejection_percent =
426  outlier_detection);
427  if (max_ejection_percent != nullptr) {
428  outlier_detection_update.max_ejection_percent =
429  google_protobuf_UInt32Value_value(max_ejection_percent);
430  }
431  const google_protobuf_UInt32Value* enforcing_success_rate =
433  outlier_detection);
434  if (enforcing_success_rate != nullptr) {
435  uint32_t enforcement_percentage =
436  google_protobuf_UInt32Value_value(enforcing_success_rate);
437  if (enforcement_percentage != 0) {
438  OutlierDetectionConfig::SuccessRateEjection success_rate_ejection;
439  success_rate_ejection.enforcement_percentage = enforcement_percentage;
440  const google_protobuf_UInt32Value* minimum_hosts =
442  outlier_detection);
443  if (minimum_hosts != nullptr) {
444  success_rate_ejection.minimum_hosts =
445  google_protobuf_UInt32Value_value(minimum_hosts);
446  }
447  const google_protobuf_UInt32Value* request_volume =
449  outlier_detection);
450  if (request_volume != nullptr) {
451  success_rate_ejection.request_volume =
452  google_protobuf_UInt32Value_value(request_volume);
453  }
454  const google_protobuf_UInt32Value* stdev_factor =
456  outlier_detection);
457  if (stdev_factor != nullptr) {
458  success_rate_ejection.stdev_factor =
459  google_protobuf_UInt32Value_value(stdev_factor);
460  }
461  outlier_detection_update.success_rate_ejection = success_rate_ejection;
462  }
463  }
464  const google_protobuf_UInt32Value* enforcing_failure_percentage =
466  outlier_detection);
467  if (enforcing_failure_percentage != nullptr) {
468  uint32_t enforcement_percentage =
469  google_protobuf_UInt32Value_value(enforcing_failure_percentage);
470  if (enforcement_percentage != 0) {
471  OutlierDetectionConfig::FailurePercentageEjection
472  failure_percentage_ejection;
473  failure_percentage_ejection.enforcement_percentage =
474  enforcement_percentage;
475  const google_protobuf_UInt32Value* minimum_hosts =
477  outlier_detection);
478  if (minimum_hosts != nullptr) {
479  failure_percentage_ejection.minimum_hosts =
480  google_protobuf_UInt32Value_value(minimum_hosts);
481  }
482  const google_protobuf_UInt32Value* request_volume =
484  outlier_detection);
485  if (request_volume != nullptr) {
486  failure_percentage_ejection.request_volume =
487  google_protobuf_UInt32Value_value(request_volume);
488  }
489  const google_protobuf_UInt32Value* threshold =
491  outlier_detection);
492  if (threshold != nullptr) {
493  failure_percentage_ejection.threshold =
495  }
496  outlier_detection_update.failure_percentage_ejection =
497  failure_percentage_ejection;
498  }
499  }
500  cds_update->outlier_detection = outlier_detection_update;
501  }
502  return GRPC_ERROR_CREATE_FROM_VECTOR("errors parsing CDS resource", &errors);
503 }
504 
505 void MaybeLogCluster(const XdsEncodingContext& context,
507  if (GRPC_TRACE_FLAG_ENABLED(*context.tracer) &&
509  const upb_MessageDef* msg_type =
511  char buf[10240];
512  upb_TextEncode(cluster, msg_type, nullptr, 0, buf, sizeof(buf));
513  gpr_log(GPR_DEBUG, "[xds_client %p] Cluster: %s", context.client, buf);
514  }
515 }
516 
517 } // namespace
518 
520  const XdsEncodingContext& context, absl::string_view serialized_resource,
521  bool is_v2) const {
522  // Parse serialized proto.
523  auto* resource = envoy_config_cluster_v3_Cluster_parse(
524  serialized_resource.data(), serialized_resource.size(), context.arena);
525  if (resource == nullptr) {
526  return absl::InvalidArgumentError("Can't parse Cluster resource.");
527  }
528  MaybeLogCluster(context, resource);
529  // Validate resource.
531  result.name =
533  auto cluster_data = absl::make_unique<ResourceDataSubclass>();
535  CdsResourceParse(context, resource, is_v2, &cluster_data->resource);
536  if (!GRPC_ERROR_IS_NONE(error)) {
539  if (GRPC_TRACE_FLAG_ENABLED(*context.tracer)) {
540  gpr_log(GPR_ERROR, "[xds_client %p] invalid Cluster %s: %s",
541  context.client, result.name.c_str(), error_str.c_str());
542  }
543  result.resource = absl::InvalidArgumentError(error_str);
544  } else {
545  if (GRPC_TRACE_FLAG_ENABLED(*context.tracer)) {
546  gpr_log(GPR_INFO, "[xds_client %p] parsed Cluster %s: %s", context.client,
547  result.name.c_str(), cluster_data->resource.ToString().c_str());
548  }
549  result.resource = std::move(cluster_data);
550  }
551  return std::move(result);
552 }
553 
554 } // namespace grpc_core
envoy_config_cluster_v3_Cluster_RingHashLbConfig_minimum_ring_size
UPB_INLINE const struct google_protobuf_UInt64Value * envoy_config_cluster_v3_Cluster_RingHashLbConfig_minimum_ring_size(const envoy_config_cluster_v3_Cluster_RingHashLbConfig *msg)
Definition: config/cluster/v3/cluster.upb.h:1982
trace.h
absl::InvalidArgumentError
Status InvalidArgumentError(absl::string_view message)
Definition: third_party/abseil-cpp/absl/status/status.cc:351
_gevent_test_main.result
result
Definition: _gevent_test_main.py:96
GPR_INFO
#define GPR_INFO
Definition: include/grpc/impl/codegen/log.h:56
envoy_config_cluster_v3_Cluster_has_circuit_breakers
UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_circuit_breakers(const envoy_config_cluster_v3_Cluster *msg)
Definition: config/cluster/v3/cluster.upb.h:378
cluster.upbdefs.h
GRPC_ERROR_NONE
#define GRPC_ERROR_NONE
Definition: error.h:234
log.h
envoy_config_cluster_v3_OutlierDetection_failure_percentage_threshold
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_config_cluster_v3_OutlierDetection_failure_percentage_threshold(const envoy_config_cluster_v3_OutlierDetection *msg)
Definition: outlier_detection.upb.h:202
envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_requests
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_requests(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg)
Definition: circuit_breaker.upb.h:175
circuit_breaker.upb.h
envoy_extensions_clusters_aggregate_v3_ClusterConfig_parse
UPB_INLINE envoy_extensions_clusters_aggregate_v3_ClusterConfig * envoy_extensions_clusters_aggregate_v3_ClusterConfig_parse(const char *buf, size_t size, upb_Arena *arena)
Definition: extensions/clusters/aggregate/v3/cluster.upb.h:34
absl::StrCat
std::string StrCat(const AlphaNum &a, const AlphaNum &b)
Definition: abseil-cpp/absl/strings/str_cat.cc:98
envoy_config_cluster_v3_Cluster_EDS
@ envoy_config_cluster_v3_Cluster_EDS
Definition: config/cluster/v3/cluster.upb.h:164
absl::StrFormat
ABSL_MUST_USE_RESULT std::string StrFormat(const FormatSpec< Args... > &format, const Args &... args)
Definition: abseil-cpp/absl/strings/str_format.h:338
envoy_config_cluster_v3_Cluster_RING_HASH
@ envoy_config_cluster_v3_Cluster_RING_HASH
Definition: config/cluster/v3/cluster.upb.h:179
gpr_should_log
GPRAPI void GPRAPI int gpr_should_log(gpr_log_severity severity)
Definition: log.cc:67
grpc_core::CommonTlsContext::Empty
bool Empty() const
Definition: xds_common_types.cc:102
envoy_config_endpoint_v3_ClusterLoadAssignment_endpoints
UPB_INLINE const struct envoy_config_endpoint_v3_LocalityLbEndpoints *const * envoy_config_endpoint_v3_ClusterLoadAssignment_endpoints(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg, size_t *len)
Definition: endpoint.upb.h:91
grpc_core::XdsEncodingContext
Definition: upb_utils.h:39
envoy_config_cluster_v3_OutlierDetection_base_ejection_time
UPB_INLINE const struct google_protobuf_Duration * envoy_config_cluster_v3_OutlierDetection_base_ejection_time(const envoy_config_cluster_v3_OutlierDetection *msg)
Definition: outlier_detection.upb.h:88
grpc_core
Definition: call_metric_recorder.h:31
xds_resource_type.h
envoy_config_cluster_v3_Cluster_transport_socket
UPB_INLINE const struct envoy_config_core_v3_TransportSocket * envoy_config_cluster_v3_Cluster_transport_socket(const envoy_config_cluster_v3_Cluster *msg)
Definition: config/cluster/v3/cluster.upb.h:480
upb_StringView::data
const char * data
Definition: upb/upb/upb.h:73
upb_MessageDef
Definition: upb/upb/def.c:100
buf
voidpf void * buf
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
absl::string_view
Definition: abseil-cpp/absl/strings/string_view.h:167
envoy_config_cluster_v3_OutlierDetection_success_rate_stdev_factor
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_config_cluster_v3_OutlierDetection_success_rate_stdev_factor(const envoy_config_cluster_v3_OutlierDetection *msg)
Definition: outlier_detection.upb.h:142
envoy_config_cluster_v3_Cluster_RingHashLbConfig_hash_function
UPB_INLINE int32_t envoy_config_cluster_v3_Cluster_RingHashLbConfig_hash_function(const envoy_config_cluster_v3_Cluster_RingHashLbConfig *msg)
Definition: config/cluster/v3/cluster.upb.h:1988
envoy_config_core_v3_TransportSocket_typed_config
UPB_INLINE const struct google_protobuf_Any * envoy_config_core_v3_TransportSocket_typed_config(const envoy_config_core_v3_TransportSocket *msg)
Definition: base.upb.h:1649
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
error
grpc_error_handle error
Definition: retry_filter.cc:499
grpc_core::XdsClusterResource::eds_service_name
std::string eds_service_name
Definition: xds_cluster.h:51
envoy_config_cluster_v3_OutlierDetection_interval
UPB_INLINE const struct google_protobuf_Duration * envoy_config_cluster_v3_OutlierDetection_interval(const envoy_config_cluster_v3_OutlierDetection *msg)
Definition: outlier_detection.upb.h:79
grpc_core::XdsClusterResource::ToString
std::string ToString() const
Definition: xds_cluster.cc:63
envoy_config_core_v3_SocketAddress_has_port_value
UPB_INLINE bool envoy_config_core_v3_SocketAddress_has_port_value(const envoy_config_core_v3_SocketAddress *msg)
Definition: address.upb.h:212
envoy_config_cluster_v3_Cluster_EdsClusterConfig
struct envoy_config_cluster_v3_Cluster_EdsClusterConfig envoy_config_cluster_v3_Cluster_EdsClusterConfig
Definition: config/cluster/v3/cluster.upb.h:52
envoy_config_cluster_v3_OutlierDetection_failure_percentage_minimum_hosts
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_config_cluster_v3_OutlierDetection_failure_percentage_minimum_hosts(const envoy_config_cluster_v3_OutlierDetection *msg)
Definition: outlier_detection.upb.h:229
envoy_config_core_v3_DEFAULT
@ envoy_config_core_v3_DEFAULT
Definition: base.upb.h:138
endpoint.upb.h
grpc_core::XdsOutlierDetectionEnabled
bool XdsOutlierDetectionEnabled()
Definition: outlier_detection.cc:77
setup.name
name
Definition: setup.py:542
envoy_config_core_v3_SocketAddress_port_value
UPB_INLINE uint32_t envoy_config_core_v3_SocketAddress_port_value(const envoy_config_core_v3_SocketAddress *msg)
Definition: address.upb.h:218
cluster.upb.h
outlier_detection.upb.h
envoy_config_cluster_v3_Cluster_parse
UPB_INLINE envoy_config_cluster_v3_Cluster * envoy_config_cluster_v3_Cluster_parse(const char *buf, size_t size, upb_Arena *arena)
Definition: config/cluster/v3/cluster.upb.h:267
envoy_config_cluster_v3_OutlierDetection
struct envoy_config_cluster_v3_OutlierDetection envoy_config_cluster_v3_OutlierDetection
Definition: outlier_detection.upb.h:24
grpc_core::XdsClusterResource::EDS
@ EDS
Definition: xds_cluster.h:46
envoy_config_endpoint_v3_LocalityLbEndpoints_lb_endpoints
const UPB_INLINE envoy_config_endpoint_v3_LbEndpoint *const * envoy_config_endpoint_v3_LocalityLbEndpoints_lb_endpoints(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg, size_t *len)
Definition: endpoint_components.upb.h:436
envoy_config_cluster_v3_CircuitBreakers
struct envoy_config_cluster_v3_CircuitBreakers envoy_config_cluster_v3_CircuitBreakers
Definition: circuit_breaker.upb.h:26
GPR_LOG_SEVERITY_DEBUG
@ GPR_LOG_SEVERITY_DEBUG
Definition: include/grpc/impl/codegen/log.h:46
envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_parse
UPB_INLINE envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext * envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_parse(const char *buf, size_t size, upb_Arena *arena)
Definition: tls.upb.h:80
envoy_config_cluster_v3_OutlierDetection_max_ejection_percent
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_config_cluster_v3_OutlierDetection_max_ejection_percent(const envoy_config_cluster_v3_OutlierDetection *msg)
Definition: outlier_detection.upb.h:97
grpc_core::XdsClusterResource::max_ring_size
uint64_t max_ring_size
Definition: xds_cluster.h:70
GRPC_TRACE_FLAG_ENABLED
#define GRPC_TRACE_FLAG_ENABLED(f)
Definition: debug/trace.h:114
tls.upb.h
grpc_core::XdsClusterResource::lb_policy
std::string lb_policy
Definition: xds_cluster.h:67
GRPC_ERROR_CREATE_FROM_VECTOR
#define GRPC_ERROR_CREATE_FROM_VECTOR(desc, error_list)
Definition: error.h:314
config_source.upb.h
grpc_core::XdsClusterResource::cluster_type
ClusterType cluster_type
Definition: xds_cluster.h:47
base.upb.h
grpc_core::UpbStringToStdString
std::string UpbStringToStdString(const upb_StringView &str)
Definition: upb_utils.h:60
google_protobuf_Any
struct google_protobuf_Any google_protobuf_Any
Definition: any.upb.h:24
envoy_config_cluster_v3_Cluster_ROUND_ROBIN
@ envoy_config_cluster_v3_Cluster_ROUND_ROBIN
Definition: config/cluster/v3/cluster.upb.h:177
uint32_t
unsigned int uint32_t
Definition: stdint-msvc2008.h:80
envoy_config_cluster_v3_Cluster_has_cluster_type
UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_cluster_type(const envoy_config_cluster_v3_Cluster *msg)
Definition: config/cluster/v3/cluster.upb.h:585
grpc_core::XdsClusterResource::common_tls_context
CommonTlsContext common_tls_context
Definition: xds_cluster.h:60
envoy_config_core_v3_TransportSocket_name
UPB_INLINE upb_StringView envoy_config_core_v3_TransportSocket_name(const envoy_config_core_v3_TransportSocket *msg)
Definition: base.upb.h:1640
grpc_error_add_child
grpc_error_handle grpc_error_add_child(grpc_error_handle src, grpc_error_handle child)
Definition: error.cc:678
grpc_core::ParseDuration
Duration ParseDuration(const google_protobuf_Duration *proto_duration)
Definition: xds_common_types.h:39
envoy_config_cluster_v3_Cluster_LOGICAL_DNS
@ envoy_config_cluster_v3_Cluster_LOGICAL_DNS
Definition: config/cluster/v3/cluster.upb.h:163
grpc_core::XdsClusterResource::dns_hostname
std::string dns_hostname
Definition: xds_cluster.h:54
envoy_config_cluster_v3_CircuitBreakers_thresholds
const UPB_INLINE envoy_config_cluster_v3_CircuitBreakers_Thresholds *const * envoy_config_cluster_v3_CircuitBreakers_thresholds(const envoy_config_cluster_v3_CircuitBreakers *msg, size_t *len)
Definition: circuit_breaker.upb.h:76
errors
const char * errors
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/tokenizer_unittest.cc:841
envoy_config_cluster_v3_Cluster_EdsClusterConfig_eds_config
UPB_INLINE const struct envoy_config_core_v3_ConfigSource * envoy_config_cluster_v3_Cluster_EdsClusterConfig_eds_config(const envoy_config_cluster_v3_Cluster_EdsClusterConfig *msg)
Definition: config/cluster/v3/cluster.upb.h:1463
absl::move
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
Definition: abseil-cpp/absl/utility/utility.h:221
grpc_core::XdsClusterResource::max_concurrent_requests
uint32_t max_concurrent_requests
Definition: xds_cluster.h:73
absl::StrJoin
std::string StrJoin(Iterator start, Iterator end, absl::string_view sep, Formatter &&fmt)
Definition: abseil-cpp/absl/strings/str_join.h:239
cluster
absl::string_view cluster
Definition: xds_resolver.cc:331
absl::string_view::size
constexpr size_type size() const noexcept
Definition: abseil-cpp/absl/strings/string_view.h:277
upb_StringView::size
size_t size
Definition: upb/upb/upb.h:74
envoy_config_core_v3_SocketAddress_resolver_name
UPB_INLINE upb_StringView envoy_config_core_v3_SocketAddress_resolver_name(const envoy_config_core_v3_SocketAddress *msg)
Definition: address.upb.h:233
google_protobuf_UInt64Value_value
UPB_INLINE uint64_t google_protobuf_UInt64Value_value(const google_protobuf_UInt64Value *msg)
Definition: wrappers.upb.h:213
envoy_config_endpoint_v3_Endpoint_address
UPB_INLINE const struct envoy_config_core_v3_Address * envoy_config_endpoint_v3_Endpoint_address(const envoy_config_endpoint_v3_Endpoint *msg)
Definition: endpoint_components.upb.h:91
xds_common_types.h
envoy_config_cluster_v3_Cluster_load_assignment
UPB_INLINE const struct envoy_config_endpoint_v3_ClusterLoadAssignment * envoy_config_cluster_v3_Cluster_load_assignment(const envoy_config_cluster_v3_Cluster *msg)
Definition: config/cluster/v3/cluster.upb.h:549
envoy_config_endpoint_v3_LbEndpoint_endpoint
const UPB_INLINE envoy_config_endpoint_v3_Endpoint * envoy_config_endpoint_v3_LbEndpoint_endpoint(const envoy_config_endpoint_v3_LbEndpoint *msg)
Definition: endpoint_components.upb.h:236
envoy_config_cluster_v3_Cluster_type
UPB_INLINE int32_t envoy_config_cluster_v3_Cluster_type(const envoy_config_cluster_v3_Cluster *msg)
Definition: config/cluster/v3/cluster.upb.h:324
upb.h
gpr_log
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
endpoint_components.upb.h
grpc_core::CommonTlsContext::CertificateValidationContext::ca_certificate_provider_instance
CertificateProviderPluginInstance ca_certificate_provider_instance
Definition: xds_common_types.h:60
envoy_config_core_v3_ConfigSource_has_self
UPB_INLINE bool envoy_config_core_v3_ConfigSource_has_self(const envoy_config_core_v3_ConfigSource *msg)
Definition: config_source.upb.h:555
envoy_config_cluster_v3_Cluster_has_type
UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_type(const envoy_config_cluster_v3_Cluster *msg)
Definition: config/cluster/v3/cluster.upb.h:318
grpc_core::XdsClusterResource::prioritized_cluster_names
std::vector< std::string > prioritized_cluster_names
Definition: xds_cluster.h:57
grpc_core::JoinHostPort
std::string JoinHostPort(absl::string_view host, int port)
Definition: host_port.cc:32
wrappers.upb.h
envoy_config_core_v3_Address_socket_address
const UPB_INLINE envoy_config_core_v3_SocketAddress * envoy_config_core_v3_Address_socket_address(const envoy_config_core_v3_Address *msg)
Definition: address.upb.h:505
envoy_config_core_v3_SocketAddress_address
UPB_INLINE upb_StringView envoy_config_core_v3_SocketAddress_address(const envoy_config_core_v3_SocketAddress *msg)
Definition: address.upb.h:209
envoy_config_cluster_v3_Cluster_getmsgdef
const UPB_INLINE upb_MessageDef * envoy_config_cluster_v3_Cluster_getmsgdef(upb_DefPool *s)
Definition: config/cluster/v3/cluster.upbdefs.h:29
time.h
envoy_config_cluster_v3_Cluster_circuit_breakers
UPB_INLINE const struct envoy_config_cluster_v3_CircuitBreakers * envoy_config_cluster_v3_Cluster_circuit_breakers(const envoy_config_cluster_v3_Cluster *msg)
Definition: config/cluster/v3/cluster.upb.h:384
grpc_core::CommonTlsContext::certificate_validation_context
CertificateValidationContext certificate_validation_context
Definition: xds_common_types.h:73
error.h
envoy_config_cluster_v3_Cluster
struct envoy_config_cluster_v3_Cluster envoy_config_cluster_v3_Cluster
Definition: config/cluster/v3/cluster.upb.h:49
xds_cluster.h
host_port.h
GPR_ERROR
#define GPR_ERROR
Definition: include/grpc/impl/codegen/log.h:57
envoy_config_cluster_v3_CircuitBreakers_Thresholds
struct envoy_config_cluster_v3_CircuitBreakers_Thresholds envoy_config_cluster_v3_CircuitBreakers_Thresholds
Definition: circuit_breaker.upb.h:27
GRPC_ERROR_CREATE_FROM_STATIC_STRING
#define GRPC_ERROR_CREATE_FROM_STATIC_STRING(desc)
Definition: error.h:291
envoy_config_cluster_v3_Cluster_lrs_server
UPB_INLINE const struct envoy_config_core_v3_ConfigSource * envoy_config_cluster_v3_Cluster_lrs_server(const envoy_config_cluster_v3_Cluster *msg)
Definition: config/cluster/v3/cluster.upb.h:624
google_protobuf_UInt32Value_value
UPB_INLINE uint32_t google_protobuf_UInt32Value_value(const google_protobuf_UInt32Value *msg)
Definition: wrappers.upb.h:297
envoy_config_cluster_v3_Cluster_cluster_type
const UPB_INLINE envoy_config_cluster_v3_Cluster_CustomClusterType * envoy_config_cluster_v3_Cluster_cluster_type(const envoy_config_cluster_v3_Cluster *msg)
Definition: config/cluster/v3/cluster.upb.h:591
grpc_core::XdsClusterResourceType::Decode
absl::StatusOr< DecodeResult > Decode(const XdsEncodingContext &context, absl::string_view serialized_resource, bool is_v2) const override
Definition: xds_cluster.cc:519
grpc_core::XdsClusterResource::lrs_load_reporting_server
absl::optional< XdsBootstrap::XdsServer > lrs_load_reporting_server
Definition: xds_cluster.h:64
upb_TextEncode
size_t upb_TextEncode(const upb_Message *msg, const upb_MessageDef *m, const upb_DefPool *ext_pool, int options, char *buf, size_t size)
Definition: text_encode.c:455
contents
string_view contents
Definition: elf.cc:597
grpc_core::CommonTlsContext::ToString
std::string ToString() const
Definition: xds_common_types.cc:87
envoy_config_cluster_v3_Cluster_eds_cluster_config
const UPB_INLINE envoy_config_cluster_v3_Cluster_EdsClusterConfig * envoy_config_cluster_v3_Cluster_eds_cluster_config(const envoy_config_cluster_v3_Cluster *msg)
Definition: config/cluster/v3/cluster.upb.h:333
grpc_core::XdsClusterResource::min_ring_size
uint64_t min_ring_size
Definition: xds_cluster.h:69
grpc_core::CommonTlsContext
Definition: xds_common_types.h:45
upb_StringView
Definition: upb/upb/upb.h:72
envoy_config_cluster_v3_Cluster_ring_hash_lb_config
const UPB_INLINE envoy_config_cluster_v3_Cluster_RingHashLbConfig * envoy_config_cluster_v3_Cluster_ring_hash_lb_config(const envoy_config_cluster_v3_Cluster *msg)
Definition: config/cluster/v3/cluster.upb.h:471
grpc_error_std_string
std::string grpc_error_std_string(grpc_error_handle error)
Definition: error.cc:944
GRPC_ERROR_CREATE_FROM_CPP_STRING
#define GRPC_ERROR_CREATE_FROM_CPP_STRING(desc)
Definition: error.h:297
envoy_config_cluster_v3_Cluster_CustomClusterType_name
UPB_INLINE upb_StringView envoy_config_cluster_v3_Cluster_CustomClusterType_name(const envoy_config_cluster_v3_Cluster_CustomClusterType *msg)
Definition: config/cluster/v3/cluster.upb.h:1396
envoy_config_cluster_v3_OutlierDetection_enforcing_success_rate
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_config_cluster_v3_OutlierDetection_enforcing_success_rate(const envoy_config_cluster_v3_OutlierDetection *msg)
Definition: outlier_detection.upb.h:115
envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_common_tls_context
const UPB_INLINE envoy_extensions_transport_sockets_tls_v3_CommonTlsContext * envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_common_tls_context(const envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *msg)
Definition: tls.upb.h:112
envoy_config_cluster_v3_CircuitBreakers_Thresholds_priority
UPB_INLINE int32_t envoy_config_cluster_v3_CircuitBreakers_Thresholds_priority(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg)
Definition: circuit_breaker.upb.h:148
envoy_config_cluster_v3_OutlierDetection_failure_percentage_request_volume
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_config_cluster_v3_OutlierDetection_failure_percentage_request_volume(const envoy_config_cluster_v3_OutlierDetection *msg)
Definition: outlier_detection.upb.h:238
envoy_config_cluster_v3_OutlierDetection_success_rate_minimum_hosts
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_config_cluster_v3_OutlierDetection_success_rate_minimum_hosts(const envoy_config_cluster_v3_OutlierDetection *msg)
Definition: outlier_detection.upb.h:124
grpc_core::XdsClusterResource::LOGICAL_DNS
@ LOGICAL_DNS
Definition: xds_cluster.h:46
envoy_extensions_clusters_aggregate_v3_ClusterConfig_clusters
UPB_INLINE upb_StringView const * envoy_extensions_clusters_aggregate_v3_ClusterConfig_clusters(const envoy_extensions_clusters_aggregate_v3_ClusterConfig *msg, size_t *len)
Definition: extensions/clusters/aggregate/v3/cluster.upb.h:63
grpc_core::XdsResourceType::DecodeResult
Definition: xds_resource_type.h:44
google_protobuf_Duration
struct google_protobuf_Duration google_protobuf_Duration
Definition: duration.upb.h:24
envoy_config_core_v3_TransportSocket
struct envoy_config_core_v3_TransportSocket envoy_config_core_v3_TransportSocket
Definition: base.upb.h:68
GRPC_ERROR_UNREF
#define GRPC_ERROR_UNREF(err)
Definition: error.h:262
envoy_config_cluster_v3_Cluster_CustomClusterType
struct envoy_config_cluster_v3_Cluster_CustomClusterType envoy_config_cluster_v3_Cluster_CustomClusterType
Definition: config/cluster/v3/cluster.upb.h:51
envoy_config_cluster_v3_Cluster_name
UPB_INLINE upb_StringView envoy_config_cluster_v3_Cluster_name(const envoy_config_cluster_v3_Cluster *msg)
Definition: config/cluster/v3/cluster.upb.h:315
google_protobuf_UInt64Value
struct google_protobuf_UInt64Value google_protobuf_UInt64Value
Definition: wrappers.upb.h:35
grpc_core::CommonTlsContext::Parse
static grpc_error_handle Parse(const XdsEncodingContext &context, const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *common_tls_context_proto, CommonTlsContext *common_tls_context)
Definition: xds_common_types.cc:272
envoy_config_core_v3_ConfigSource_has_ads
UPB_INLINE bool envoy_config_core_v3_ConfigSource_has_ads(const envoy_config_core_v3_ConfigSource *msg)
Definition: config_source.upb.h:537
grpc_core::CommonTlsContext::CertificateProviderPluginInstance::instance_name
std::string instance_name
Definition: xds_common_types.h:47
GPR_DEBUG
#define GPR_DEBUG
Definition: include/grpc/impl/codegen/log.h:55
absl::string_view::empty
constexpr bool empty() const noexcept
Definition: abseil-cpp/absl/strings/string_view.h:292
envoy_config_cluster_v3_OutlierDetection_enforcing_failure_percentage
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_config_cluster_v3_OutlierDetection_enforcing_failure_percentage(const envoy_config_cluster_v3_OutlierDetection *msg)
Definition: outlier_detection.upb.h:211
context
grpc::ClientContext context
Definition: istio_echo_server_lib.cc:61
envoy_config_core_v3_ConfigSource
struct envoy_config_core_v3_ConfigSource envoy_config_core_v3_ConfigSource
Definition: config_source.upb.h:35
cluster.upb.h
envoy_config_cluster_v3_Cluster_RingHashLbConfig_maximum_ring_size
UPB_INLINE const struct google_protobuf_UInt64Value * envoy_config_cluster_v3_Cluster_RingHashLbConfig_maximum_ring_size(const envoy_config_cluster_v3_Cluster_RingHashLbConfig *msg)
Definition: config/cluster/v3/cluster.upb.h:1997
envoy_config_cluster_v3_OutlierDetection_max_ejection_time
UPB_INLINE const struct google_protobuf_Duration * envoy_config_cluster_v3_OutlierDetection_max_ejection_time(const envoy_config_cluster_v3_OutlierDetection *msg)
Definition: outlier_detection.upb.h:247
duration.upb.h
any.upb.h
google_protobuf_UInt32Value
struct google_protobuf_UInt32Value google_protobuf_UInt32Value
Definition: wrappers.upb.h:37
absl::StatusOr
Definition: abseil-cpp/absl/status/statusor.h:187
envoy_config_cluster_v3_Cluster_EdsClusterConfig_service_name
UPB_INLINE upb_StringView envoy_config_cluster_v3_Cluster_EdsClusterConfig_service_name(const envoy_config_cluster_v3_Cluster_EdsClusterConfig *msg)
Definition: config/cluster/v3/cluster.upb.h:1469
grpc_error
Definition: error_internal.h:42
size
voidpf void uLong size
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
envoy_config_cluster_v3_Cluster_outlier_detection
UPB_INLINE const struct envoy_config_cluster_v3_OutlierDetection * envoy_config_cluster_v3_Cluster_outlier_detection(const envoy_config_cluster_v3_Cluster *msg)
Definition: config/cluster/v3/cluster.upb.h:435
envoy_config_cluster_v3_Cluster_RingHashLbConfig_XX_HASH
@ envoy_config_cluster_v3_Cluster_RingHashLbConfig_XX_HASH
Definition: config/cluster/v3/cluster.upb.h:201
absl::string_view::data
constexpr const_pointer data() const noexcept
Definition: abseil-cpp/absl/strings/string_view.h:336
envoy_config_cluster_v3_Cluster_CustomClusterType_typed_config
UPB_INLINE const struct google_protobuf_Any * envoy_config_cluster_v3_Cluster_CustomClusterType_typed_config(const envoy_config_cluster_v3_Cluster_CustomClusterType *msg)
Definition: config/cluster/v3/cluster.upb.h:1405
address.upb.h
text_encode.h
grpc_core::UpbStringToAbsl
absl::string_view UpbStringToAbsl(const upb_StringView &str)
Definition: upb_utils.h:56
grpc_core::XdsClusterResource::AGGREGATE
@ AGGREGATE
Definition: xds_cluster.h:46
envoy_config_cluster_v3_Cluster_has_outlier_detection
UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_outlier_detection(const envoy_config_cluster_v3_Cluster *msg)
Definition: config/cluster/v3/cluster.upb.h:429
envoy_config_cluster_v3_Cluster_lb_policy
UPB_INLINE int32_t envoy_config_cluster_v3_Cluster_lb_policy(const envoy_config_cluster_v3_Cluster *msg)
Definition: config/cluster/v3/cluster.upb.h:357
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
google_protobuf_Any_value
UPB_INLINE upb_StringView google_protobuf_Any_value(const google_protobuf_Any *msg)
Definition: any.upb.h:69
type_name
static const char * type_name(int type)
Definition: adig.c:889
GRPC_ERROR_IS_NONE
#define GRPC_ERROR_IS_NONE(err)
Definition: error.h:241
envoy_extensions_clusters_aggregate_v3_ClusterConfig
struct envoy_extensions_clusters_aggregate_v3_ClusterConfig envoy_extensions_clusters_aggregate_v3_ClusterConfig
Definition: extensions/clusters/aggregate/v3/cluster.upb.h:24
envoy_config_cluster_v3_OutlierDetection_success_rate_request_volume
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_config_cluster_v3_OutlierDetection_success_rate_request_volume(const envoy_config_cluster_v3_OutlierDetection *msg)
Definition: outlier_detection.upb.h:133
port_platform.h


grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:57