xds_route_config.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 #include <stdint.h>
23 
24 #include <map>
25 #include <memory>
26 #include <set>
27 #include <string>
28 #include <type_traits>
29 #include <utility>
30 #include <vector>
31 
32 #include "absl/memory/memory.h"
33 #include "absl/status/status.h"
34 #include "absl/status/statusor.h"
35 #include "absl/strings/str_cat.h"
36 #include "absl/strings/str_format.h"
37 #include "absl/strings/str_join.h"
38 #include "absl/strings/str_split.h"
39 #include "absl/strings/string_view.h"
40 #include "absl/types/optional.h"
41 #include "absl/types/variant.h"
53 #include "re2/re2.h"
54 #include "upb/def.h"
55 #include "upb/text_encode.h"
56 #include "upb/upb.h"
57 
58 #include <grpc/status.h>
59 #include <grpc/support/alloc.h>
60 #include <grpc/support/log.h>
61 
71 #include "src/core/lib/gpr/env.h"
78 
79 namespace grpc_core {
80 
81 // TODO(yashykt): Remove once RBAC is no longer experimental
83  char* value = gpr_getenv("GRPC_XDS_EXPERIMENTAL_RBAC");
84  bool parsed_value;
85  bool parse_succeeded = gpr_parse_bool_value(value, &parsed_value);
86  gpr_free(value);
87  return parse_succeeded && parsed_value;
88 }
89 
90 // TODO(donnadionne): Remove once RLS is no longer experimental
91 bool XdsRlsEnabled() {
92  char* value = gpr_getenv("GRPC_EXPERIMENTAL_XDS_RLS_LB");
93  bool parsed_value;
94  bool parse_succeeded = gpr_parse_bool_value(value, &parsed_value);
95  gpr_free(value);
96  return parse_succeeded && parsed_value;
97 }
98 
99 //
100 // XdsRouteConfigResource::RetryPolicy
101 //
102 
104  const {
105  std::vector<std::string> contents;
106  contents.push_back(
107  absl::StrCat("RetryBackOff Base: ", base_interval.ToString()));
108  contents.push_back(
109  absl::StrCat("RetryBackOff max: ", max_interval.ToString()));
110  return absl::StrJoin(contents, ",");
111 }
112 
114  std::vector<std::string> contents;
115  contents.push_back(absl::StrFormat("num_retries=%d", num_retries));
116  contents.push_back(retry_back_off.ToString());
117  return absl::StrCat("{", absl::StrJoin(contents, ","), "}");
118 }
119 
120 //
121 // XdsRouteConfigResource::Route::Matchers
122 //
123 
125  std::vector<std::string> contents;
126  contents.push_back(
127  absl::StrFormat("PathMatcher{%s}", path_matcher.ToString()));
128  for (const HeaderMatcher& header_matcher : header_matchers) {
129  contents.push_back(header_matcher.ToString());
130  }
131  if (fraction_per_million.has_value()) {
132  contents.push_back(absl::StrFormat("Fraction Per Million %d",
133  fraction_per_million.value()));
134  }
135  return absl::StrJoin(contents, "\n");
136 }
137 
138 //
139 // XdsRouteConfigResource::Route::RouteAction::HashPolicy
140 //
141 
143  const HashPolicy& other)
144  : type(other.type),
145  header_name(other.header_name),
146  regex_substitution(other.regex_substitution) {
147  if (other.regex != nullptr) {
148  regex =
149  absl::make_unique<RE2>(other.regex->pattern(), other.regex->options());
150  }
151 }
152 
155  const HashPolicy& other) {
156  type = other.type;
157  header_name = other.header_name;
158  if (other.regex != nullptr) {
159  regex =
160  absl::make_unique<RE2>(other.regex->pattern(), other.regex->options());
161  }
162  regex_substitution = other.regex_substitution;
163  return *this;
164 }
165 
167  HashPolicy&& other) noexcept
168  : type(other.type),
169  header_name(std::move(other.header_name)),
170  regex(std::move(other.regex)),
171  regex_substitution(std::move(other.regex_substitution)) {}
172 
175  HashPolicy&& other) noexcept {
176  type = other.type;
177  header_name = std::move(other.header_name);
178  regex = std::move(other.regex);
179  regex_substitution = std::move(other.regex_substitution);
180  return *this;
181 }
182 
184 operator==(const HashPolicy& other) const {
185  if (type != other.type) return false;
186  if (type == Type::HEADER) {
187  if (regex == nullptr) {
188  if (other.regex != nullptr) return false;
189  } else {
190  if (other.regex == nullptr) return false;
191  return header_name == other.header_name &&
192  regex->pattern() == other.regex->pattern() &&
193  regex_substitution == other.regex_substitution;
194  }
195  }
196  return true;
197 }
198 
200  const {
201  std::vector<std::string> contents;
202  switch (type) {
203  case Type::HEADER:
204  contents.push_back("type=HEADER");
205  break;
206  case Type::CHANNEL_ID:
207  contents.push_back("type=CHANNEL_ID");
208  break;
209  }
210  contents.push_back(
211  absl::StrFormat("terminal=%s", terminal ? "true" : "false"));
212  if (type == Type::HEADER) {
213  contents.push_back(absl::StrFormat(
214  "Header %s:/%s/%s", header_name,
215  (regex == nullptr) ? "" : regex->pattern(), regex_substitution));
216  }
217  return absl::StrCat("{", absl::StrJoin(contents, ", "), "}");
218 }
219 
220 //
221 // XdsRouteConfigResource::Route::RouteAction::ClusterWeight
222 //
223 
226  std::vector<std::string> contents;
227  contents.push_back(absl::StrCat("cluster=", name));
228  contents.push_back(absl::StrCat("weight=", weight));
229  if (!typed_per_filter_config.empty()) {
230  std::vector<std::string> parts;
231  for (const auto& p : typed_per_filter_config) {
232  const std::string& key = p.first;
233  const auto& config = p.second;
234  parts.push_back(absl::StrCat(key, "=", config.ToString()));
235  }
236  contents.push_back(absl::StrCat("typed_per_filter_config={",
237  absl::StrJoin(parts, ", "), "}"));
238  }
239  return absl::StrCat("{", absl::StrJoin(contents, ", "), "}");
240 }
241 
242 //
243 // XdsRouteConfigResource::Route::RouteAction
244 //
245 
247  std::vector<std::string> contents;
248  for (const HashPolicy& hash_policy : hash_policies) {
249  contents.push_back(absl::StrCat("hash_policy=", hash_policy.ToString()));
250  }
251  if (retry_policy.has_value()) {
252  contents.push_back(absl::StrCat("retry_policy=", retry_policy->ToString()));
253  }
254  if (action.index() == kClusterIndex) {
255  contents.push_back(
256  absl::StrFormat("Cluster name: %s", absl::get<kClusterIndex>(action)));
257  } else if (action.index() == kWeightedClustersIndex) {
258  auto& action_weighted_clusters = absl::get<kWeightedClustersIndex>(action);
259  for (const ClusterWeight& cluster_weight : action_weighted_clusters) {
260  contents.push_back(cluster_weight.ToString());
261  }
262  } else if (action.index() == kClusterSpecifierPluginIndex) {
263  contents.push_back(
264  absl::StrFormat("Cluster specifier plugin name: %s",
265  absl::get<kClusterSpecifierPluginIndex>(action)));
266  }
267  if (max_stream_duration.has_value()) {
268  contents.push_back(max_stream_duration->ToString());
269  }
270  return absl::StrCat("{", absl::StrJoin(contents, ", "), "}");
271 }
272 
273 //
274 // XdsRouteConfigResource::Route
275 //
276 
278  std::vector<std::string> contents;
279  contents.push_back(matchers.ToString());
280  auto* route_action =
281  absl::get_if<XdsRouteConfigResource::Route::RouteAction>(&action);
282  if (route_action != nullptr) {
283  contents.push_back(absl::StrCat("route=", route_action->ToString()));
284  } else if (absl::holds_alternative<
286  contents.push_back("non_forwarding_action={}");
287  } else {
288  contents.push_back("unknown_action={}");
289  }
290  if (!typed_per_filter_config.empty()) {
291  contents.push_back("typed_per_filter_config={");
292  for (const auto& p : typed_per_filter_config) {
293  const std::string& name = p.first;
294  const auto& config = p.second;
295  contents.push_back(absl::StrCat(" ", name, "=", config.ToString()));
296  }
297  contents.push_back("}");
298  }
299  return absl::StrJoin(contents, "\n");
300 }
301 
302 //
303 // XdsRouteConfigResource
304 //
305 
307  std::vector<std::string> parts;
308  for (const VirtualHost& vhost : virtual_hosts) {
309  parts.push_back(
310  absl::StrCat("vhost={\n"
311  " domains=[",
312  absl::StrJoin(vhost.domains, ", "),
313  "]\n"
314  " routes=[\n"));
315  for (const XdsRouteConfigResource::Route& route : vhost.routes) {
316  parts.push_back(" {\n");
317  parts.push_back(route.ToString());
318  parts.push_back("\n }\n");
319  }
320  parts.push_back(" ]\n");
321  parts.push_back(" typed_per_filter_config={\n");
322  for (const auto& p : vhost.typed_per_filter_config) {
323  const std::string& name = p.first;
324  const auto& config = p.second;
325  parts.push_back(absl::StrCat(" ", name, "=", config.ToString(), "\n"));
326  }
327  parts.push_back(" }\n");
328  parts.push_back("]\n");
329  }
330  parts.push_back("cluster_specifier_plugins={\n");
331  for (const auto& it : cluster_specifier_plugin_map) {
332  parts.push_back(absl::StrFormat("%s={%s}\n", it.first, it.second));
333  }
334  parts.push_back("}");
335  return absl::StrJoin(parts, "");
336 }
337 
338 namespace {
339 
340 grpc_error_handle ClusterSpecifierPluginParse(
342  const envoy_config_route_v3_RouteConfiguration* route_config,
344  size_t num_cluster_specifier_plugins;
346  cluster_specifier_plugin =
348  route_config, &num_cluster_specifier_plugins);
349  for (size_t i = 0; i < num_cluster_specifier_plugins; ++i) {
352  cluster_specifier_plugin[i]);
355  if (rds_update->cluster_specifier_plugin_map.find(name) !=
356  rds_update->cluster_specifier_plugin_map.end()) {
358  "Duplicated definition of cluster_specifier_plugin ", name));
359  }
360  const google_protobuf_Any* any =
362  if (any == nullptr) {
364  "Could not obtrain TypedExtensionConfig for plugin config.");
365  }
366  auto plugin_type = ExtractExtensionTypeName(context, any);
367  if (!plugin_type.ok()) {
368  return absl_status_to_grpc_error(plugin_type.status());
369  }
371  cluster_specifier_plugin[i]);
372  const XdsClusterSpecifierPluginImpl* cluster_specifier_plugin_impl =
374  std::string lb_policy_config;
375  if (cluster_specifier_plugin_impl == nullptr) {
376  if (!is_optional) {
378  "Unknown ClusterSpecifierPlugin type ", plugin_type->type));
379  }
380  // Optional plugin, leave lb_policy_config empty.
381  } else {
382  auto config =
383  cluster_specifier_plugin_impl->GenerateLoadBalancingPolicyConfig(
384  google_protobuf_Any_value(any), context.arena, context.symtab);
385  if (!config.ok()) {
386  return absl_status_to_grpc_error(config.status());
387  }
388  lb_policy_config = std::move(*config);
389  }
390  rds_update->cluster_specifier_plugin_map[std::move(name)] =
391  std::move(lb_policy_config);
392  }
393  return GRPC_ERROR_NONE;
394 }
395 
396 grpc_error_handle RoutePathMatchParse(
398  XdsRouteConfigResource::Route* route, bool* ignore_route) {
399  auto* case_sensitive_ptr =
401  bool case_sensitive = true;
402  if (case_sensitive_ptr != nullptr) {
403  case_sensitive = google_protobuf_BoolValue_value(case_sensitive_ptr);
404  }
406  std::string match_string;
410  // Empty prefix "" is accepted.
411  if (!prefix.empty()) {
412  // Prefix "/" is accepted.
413  if (prefix[0] != '/') {
414  // Prefix which does not start with a / will never match anything, so
415  // ignore this route.
416  *ignore_route = true;
417  return GRPC_ERROR_NONE;
418  }
419  std::vector<absl::string_view> prefix_elements =
420  absl::StrSplit(prefix.substr(1), absl::MaxSplits('/', 2));
421  if (prefix_elements.size() > 2) {
422  // Prefix cannot have more than 2 slashes.
423  *ignore_route = true;
424  return GRPC_ERROR_NONE;
425  } else if (prefix_elements.size() == 2 && prefix_elements[0].empty()) {
426  // Prefix contains empty string between the 2 slashes
427  *ignore_route = true;
428  return GRPC_ERROR_NONE;
429  }
430  }
432  match_string = std::string(prefix);
436  if (path.empty()) {
437  // Path that is empty will never match anything, so ignore this route.
438  *ignore_route = true;
439  return GRPC_ERROR_NONE;
440  }
441  if (path[0] != '/') {
442  // Path which does not start with a / will never match anything, so
443  // ignore this route.
444  *ignore_route = true;
445  return GRPC_ERROR_NONE;
446  }
447  std::vector<absl::string_view> path_elements =
448  absl::StrSplit(path.substr(1), absl::MaxSplits('/', 2));
449  if (path_elements.size() != 2) {
450  // Path not in the required format of /service/method will never match
451  // anything, so ignore this route.
452  *ignore_route = true;
453  return GRPC_ERROR_NONE;
454  } else if (path_elements[0].empty()) {
455  // Path contains empty service name will never match anything, so ignore
456  // this route.
457  *ignore_route = true;
458  return GRPC_ERROR_NONE;
459  } else if (path_elements[1].empty()) {
460  // Path contains empty method name will never match anything, so ignore
461  // this route.
462  *ignore_route = true;
463  return GRPC_ERROR_NONE;
464  }
466  match_string = std::string(path);
468  const envoy_type_matcher_v3_RegexMatcher* regex_matcher =
470  GPR_ASSERT(regex_matcher != nullptr);
472  match_string = UpbStringToStdString(
474  } else {
476  "Invalid route path specifier specified.");
477  }
478  absl::StatusOr<StringMatcher> string_matcher =
479  StringMatcher::Create(type, match_string, case_sensitive);
480  if (!string_matcher.ok()) {
482  absl::StrCat("path matcher: ", string_matcher.status().message()));
483  }
484  route->matchers.path_matcher = std::move(string_matcher.value());
485  return GRPC_ERROR_NONE;
486 }
487 
488 grpc_error_handle RouteHeaderMatchersParse(
490  XdsRouteConfigResource::Route* route) {
491  size_t size;
492  const envoy_config_route_v3_HeaderMatcher* const* headers =
494  for (size_t i = 0; i < size; ++i) {
495  const envoy_config_route_v3_HeaderMatcher* header = headers[i];
496  const std::string name =
499  std::string match_string;
500  int64_t range_start = 0;
501  int64_t range_end = 0;
502  bool present_match = false;
505  match_string = UpbStringToStdString(
508  header)) {
509  const envoy_type_matcher_v3_RegexMatcher* regex_matcher =
511  GPR_ASSERT(regex_matcher != nullptr);
513  match_string = UpbStringToStdString(
517  const envoy_type_v3_Int64Range* range_matcher =
519  range_start = envoy_type_v3_Int64Range_start(range_matcher);
520  range_end = envoy_type_v3_Int64Range_end(range_matcher);
526  match_string = UpbStringToStdString(
530  match_string = UpbStringToStdString(
534  match_string = UpbStringToStdString(
536  } else {
538  "Invalid route header matcher specified.");
539  }
540  bool invert_match =
542  absl::StatusOr<HeaderMatcher> header_matcher =
543  HeaderMatcher::Create(name, type, match_string, range_start, range_end,
544  present_match, invert_match);
545  if (!header_matcher.ok()) {
547  absl::StrCat("header matcher: ", header_matcher.status().message()));
548  }
549  route->matchers.header_matchers.emplace_back(
550  std::move(header_matcher.value()));
551  }
552  return GRPC_ERROR_NONE;
553 }
554 
555 grpc_error_handle RouteRuntimeFractionParse(
557  XdsRouteConfigResource::Route* route) {
558  const envoy_config_core_v3_RuntimeFractionalPercent* runtime_fraction =
560  if (runtime_fraction != nullptr) {
561  const envoy_type_v3_FractionalPercent* fraction =
563  runtime_fraction);
564  if (fraction != nullptr) {
566  const auto denominator =
569  // Normalize to million.
570  switch (denominator) {
572  numerator *= 10000;
573  break;
575  numerator *= 100;
576  break;
578  break;
579  default:
581  "Unknown denominator type");
582  }
583  route->matchers.fraction_per_million = numerator;
584  }
585  }
586  return GRPC_ERROR_NONE;
587 }
588 
589 template <typename ParentType, typename EntryType>
590 grpc_error_handle ParseTypedPerFilterConfig(
591  const XdsEncodingContext& context, const ParentType* parent,
592  const EntryType* (*entry_func)(const ParentType*, size_t*),
593  upb_StringView (*key_func)(const EntryType*),
594  const google_protobuf_Any* (*value_func)(const EntryType*),
596  size_t filter_it = kUpb_Map_Begin;
597  while (true) {
598  const auto* filter_entry = entry_func(parent, &filter_it);
599  if (filter_entry == nullptr) break;
600  absl::string_view key = UpbStringToAbsl(key_func(filter_entry));
601  if (key.empty()) {
602  return GRPC_ERROR_CREATE_FROM_STATIC_STRING("empty filter name in map");
603  }
604  const google_protobuf_Any* any = value_func(filter_entry);
605  GPR_ASSERT(any != nullptr);
606  absl::string_view filter_type =
608  if (filter_type.empty()) {
610  absl::StrCat("no filter config specified for filter name ", key));
611  }
612  bool is_optional = false;
613  if (filter_type ==
614  "type.googleapis.com/envoy.config.route.v3.FilterConfig") {
615  upb_StringView any_value = google_protobuf_Any_value(any);
616  const auto* filter_config = envoy_config_route_v3_FilterConfig_parse(
617  any_value.data, any_value.size, context.arena);
618  if (filter_config == nullptr) {
620  absl::StrCat("could not parse FilterConfig wrapper for ", key));
621  }
622  is_optional =
624  any = envoy_config_route_v3_FilterConfig_config(filter_config);
625  if (any == nullptr) {
626  if (is_optional) continue;
628  absl::StrCat("no filter config specified for filter name ", key));
629  }
630  }
632  if (!type.ok()) {
633  return absl_status_to_grpc_error(type.status());
634  }
635  const XdsHttpFilterImpl* filter_impl =
637  if (filter_impl == nullptr) {
638  if (is_optional) continue;
640  absl::StrCat("no filter registered for config type ", type->type));
641  }
643  filter_impl->GenerateFilterConfigOverride(
644  google_protobuf_Any_value(any), context.arena);
645  if (!filter_config.ok()) {
647  "filter config for type ", type->type,
648  " failed to parse: ", StatusToString(filter_config.status())));
649  }
650  (*typed_per_filter_config)[std::string(key)] = std::move(*filter_config);
651  }
652  return GRPC_ERROR_NONE;
653 }
654 
655 grpc_error_handle RetryPolicyParse(
656  const XdsEncodingContext& context,
659  std::vector<grpc_error_handle> errors;
660  XdsRouteConfigResource::RetryPolicy retry_to_return;
661  auto retry_on = UpbStringToStdString(
663  std::vector<absl::string_view> codes = absl::StrSplit(retry_on, ',');
664  for (const auto& code : codes) {
665  if (code == "cancelled") {
666  retry_to_return.retry_on.Add(GRPC_STATUS_CANCELLED);
667  } else if (code == "deadline-exceeded") {
668  retry_to_return.retry_on.Add(GRPC_STATUS_DEADLINE_EXCEEDED);
669  } else if (code == "internal") {
670  retry_to_return.retry_on.Add(GRPC_STATUS_INTERNAL);
671  } else if (code == "resource-exhausted") {
672  retry_to_return.retry_on.Add(GRPC_STATUS_RESOURCE_EXHAUSTED);
673  } else if (code == "unavailable") {
674  retry_to_return.retry_on.Add(GRPC_STATUS_UNAVAILABLE);
675  } else {
676  if (GRPC_TRACE_FLAG_ENABLED(*context.tracer)) {
677  gpr_log(GPR_INFO, "Unsupported retry_on policy %s.",
678  std::string(code).c_str());
679  }
680  }
681  }
682  const google_protobuf_UInt32Value* num_retries =
684  if (num_retries != nullptr) {
685  uint32_t num_retries_value = google_protobuf_UInt32Value_value(num_retries);
686  if (num_retries_value == 0) {
688  "RouteAction RetryPolicy num_retries set to invalid value 0."));
689  } else {
690  retry_to_return.num_retries = num_retries_value;
691  }
692  } else {
693  retry_to_return.num_retries = 1;
694  }
697  if (backoff != nullptr) {
698  const google_protobuf_Duration* base_interval =
700  if (base_interval == nullptr) {
702  "RouteAction RetryPolicy RetryBackoff missing base interval."));
703  } else {
704  retry_to_return.retry_back_off.base_interval =
705  ParseDuration(base_interval);
706  }
707  const google_protobuf_Duration* max_interval =
709  Duration max;
710  if (max_interval != nullptr) {
711  max = ParseDuration(max_interval);
712  } else {
713  // if max interval is not set, it is 10x the base.
714  max = 10 * retry_to_return.retry_back_off.base_interval;
715  }
716  retry_to_return.retry_back_off.max_interval = max;
717  } else {
718  retry_to_return.retry_back_off.base_interval = Duration::Milliseconds(25);
719  retry_to_return.retry_back_off.max_interval = Duration::Milliseconds(250);
720  }
721  if (errors.empty()) {
722  *retry = retry_to_return;
723  return GRPC_ERROR_NONE;
724  } else {
725  return GRPC_ERROR_CREATE_FROM_VECTOR("errors parsing retry policy",
726  &errors);
727  }
728 }
729 
730 grpc_error_handle RouteActionParse(
731  const XdsEncodingContext& context,
732  const envoy_config_route_v3_Route* route_msg,
733  const std::map<std::string /*cluster_specifier_plugin_name*/,
734  std::string /*LB policy config*/>&
736  XdsRouteConfigResource::Route::RouteAction* route, bool* ignore_route) {
737  const envoy_config_route_v3_RouteAction* route_action =
739  // Get the cluster or weighted_clusters in the RouteAction.
743  if (cluster_name.empty()) {
745  "RouteAction cluster contains empty cluster name.");
746  }
747  route->action
751  route_action)) {
752  std::vector<XdsRouteConfigResource::Route::RouteAction::ClusterWeight>
753  action_weighted_clusters;
754  const envoy_config_route_v3_WeightedCluster* weighted_cluster =
756  uint32_t total_weight = 100;
759  if (weight != nullptr) {
761  }
762  size_t clusters_size;
765  &clusters_size);
766  uint32_t sum_of_weights = 0;
767  for (size_t j = 0; j < clusters_size; ++j) {
769  cluster_weight = clusters[j];
770  XdsRouteConfigResource::Route::RouteAction::ClusterWeight cluster;
773  cluster_weight));
774  if (cluster.name.empty()) {
776  "RouteAction weighted_cluster cluster contains empty cluster "
777  "name.");
778  }
781  cluster_weight);
782  if (weight == nullptr) {
784  "RouteAction weighted_cluster cluster missing weight");
785  }
787  if (cluster.weight == 0) continue;
788  sum_of_weights += cluster.weight;
789  if (context.use_v3) {
790  grpc_error_handle error = ParseTypedPerFilterConfig<
793  context, cluster_weight,
797  &cluster.typed_per_filter_config);
798  if (!GRPC_ERROR_IS_NONE(error)) return error;
799  }
800  action_weighted_clusters.emplace_back(std::move(cluster));
801  }
802  if (total_weight != sum_of_weights) {
804  "RouteAction weighted_cluster has incorrect total weight");
805  }
806  if (action_weighted_clusters.empty()) {
808  "RouteAction weighted_cluster has no valid clusters specified.");
809  }
810  route->action = std::move(action_weighted_clusters);
811  } else if (XdsRlsEnabled() &&
813  route_action)) {
814  std::string plugin_name = UpbStringToStdString(
816  route_action));
817  if (plugin_name.empty()) {
819  "RouteAction cluster contains empty cluster specifier plugin name.");
820  }
821  auto it = cluster_specifier_plugin_map.find(plugin_name);
822  if (it == cluster_specifier_plugin_map.end()) {
824  absl::StrCat("RouteAction cluster contains cluster specifier plugin "
825  "name not configured: ",
826  plugin_name));
827  }
828  if (it->second.empty()) *ignore_route = true;
829  route->action.emplace<XdsRouteConfigResource::Route::RouteAction::
830  kClusterSpecifierPluginIndex>(
831  std::move(plugin_name));
832  } else {
833  // No cluster or weighted_clusters or plugin found in RouteAction, ignore
834  // this route.
835  *ignore_route = true;
836  }
837  if (!*ignore_route) {
841  if (max_stream_duration != nullptr) {
842  const google_protobuf_Duration* duration =
845  if (duration == nullptr) {
846  duration =
849  }
850  if (duration != nullptr) {
851  route->max_stream_duration = ParseDuration(duration);
852  }
853  }
854  }
855  // Get HashPolicy from RouteAction
856  size_t size = 0;
859  for (size_t i = 0; i < size; ++i) {
861  hash_policies[i];
862  XdsRouteConfigResource::Route::RouteAction::HashPolicy policy;
863  policy.terminal =
867  filter_state;
869  hash_policy)) != nullptr) {
870  policy.type =
872  policy.header_name = UpbStringToStdString(
874  header));
876  regex_rewrite =
878  header);
879  if (regex_rewrite != nullptr) {
880  const envoy_type_matcher_v3_RegexMatcher* regex_matcher =
882  regex_rewrite);
883  if (regex_matcher == nullptr) {
884  gpr_log(
885  GPR_DEBUG,
886  "RouteAction HashPolicy contains policy specifier Header with "
887  "RegexMatchAndSubstitution but RegexMatcher pattern is "
888  "missing");
889  continue;
890  }
891  RE2::Options options;
892  policy.regex = absl::make_unique<RE2>(
895  options);
896  if (!policy.regex->ok()) {
897  gpr_log(
898  GPR_DEBUG,
899  "RouteAction HashPolicy contains policy specifier Header with "
900  "RegexMatchAndSubstitution but RegexMatcher pattern does not "
901  "compile");
902  continue;
903  }
904  policy.regex_substitution = UpbStringToStdString(
906  regex_rewrite));
907  }
908  } else if ((filter_state =
910  hash_policy)) != nullptr) {
913  filter_state));
914  if (key == "io.grpc.channel_id") {
915  policy.type = XdsRouteConfigResource::Route::RouteAction::HashPolicy::
916  Type::CHANNEL_ID;
917  } else {
919  "RouteAction HashPolicy contains policy specifier "
920  "FilterState but "
921  "key is not io.grpc.channel_id.");
922  continue;
923  }
924  } else {
926  "RouteAction HashPolicy contains unsupported policy specifier.");
927  continue;
928  }
929  route->hash_policies.emplace_back(std::move(policy));
930  }
931  // Get retry policy
934  if (retry_policy != nullptr) {
936  grpc_error_handle error = RetryPolicyParse(context, retry_policy, &retry);
937  if (!GRPC_ERROR_IS_NONE(error)) return error;
938  route->retry_policy = retry;
939  }
940  return GRPC_ERROR_NONE;
941 }
942 
943 } // namespace
944 
947  const envoy_config_route_v3_RouteConfiguration* route_config,
949  // Get the cluster spcifier plugins
950  if (XdsRlsEnabled()) {
952  ClusterSpecifierPluginParse(context, route_config, rds_update);
953  if (!GRPC_ERROR_IS_NONE(error)) return error;
954  }
955  // Get the virtual hosts.
956  size_t num_virtual_hosts;
959  route_config, &num_virtual_hosts);
960  for (size_t i = 0; i < num_virtual_hosts; ++i) {
961  rds_update->virtual_hosts.emplace_back();
963  rds_update->virtual_hosts.back();
964  // Parse domains.
965  size_t domain_size;
967  virtual_hosts[i], &domain_size);
968  for (size_t j = 0; j < domain_size; ++j) {
969  std::string domain_pattern = UpbStringToStdString(domains[j]);
970  if (!XdsRouting::IsValidDomainPattern(domain_pattern)) {
972  absl::StrCat("Invalid domain pattern \"", domain_pattern, "\"."));
973  }
974  vhost.domains.emplace_back(std::move(domain_pattern));
975  }
976  if (vhost.domains.empty()) {
977  return GRPC_ERROR_CREATE_FROM_STATIC_STRING("VirtualHost has no domains");
978  }
979  // Parse typed_per_filter_config.
980  if (context.use_v3) {
981  grpc_error_handle error = ParseTypedPerFilterConfig<
988  &vhost.typed_per_filter_config);
989  if (!GRPC_ERROR_IS_NONE(error)) return error;
990  }
991  // Parse retry policy.
993  virtual_host_retry_policy;
996  if (retry_policy != nullptr) {
998  RetryPolicyParse(context, retry_policy, &virtual_host_retry_policy);
999  if (!GRPC_ERROR_IS_NONE(error)) return error;
1000  }
1001  // Parse routes.
1002  size_t num_routes;
1003  const envoy_config_route_v3_Route* const* routes =
1005  if (num_routes < 1) {
1007  "No route found in the virtual host.");
1008  }
1009  // Build a set of cluster_specifier_plugin configured to make sure each is
1010  // actually referenced by a route action.
1011  std::set<absl::string_view> cluster_specifier_plugins;
1012  for (auto& plugin : rds_update->cluster_specifier_plugin_map) {
1013  cluster_specifier_plugins.emplace(plugin.first);
1014  }
1015  // Loop over the whole list of routes
1016  for (size_t j = 0; j < num_routes; ++j) {
1019  if (match == nullptr) {
1020  return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Match can't be null.");
1021  }
1022  size_t query_parameters_size;
1024  match, &query_parameters_size));
1025  if (query_parameters_size > 0) {
1026  continue;
1027  }
1029  bool ignore_route = false;
1031  RoutePathMatchParse(match, &route, &ignore_route);
1032  if (!GRPC_ERROR_IS_NONE(error)) return error;
1033  if (ignore_route) continue;
1034  error = RouteHeaderMatchersParse(match, &route);
1035  if (!GRPC_ERROR_IS_NONE(error)) return error;
1036  error = RouteRuntimeFractionParse(match, &route);
1037  if (!GRPC_ERROR_IS_NONE(error)) return error;
1040  auto& route_action =
1041  absl::get<XdsRouteConfigResource::Route::RouteAction>(route.action);
1042  error = RouteActionParse(context, routes[j],
1043  rds_update->cluster_specifier_plugin_map,
1044  &route_action, &ignore_route);
1045  if (!GRPC_ERROR_IS_NONE(error)) return error;
1046  if (ignore_route) continue;
1047  if (route_action.retry_policy == absl::nullopt &&
1048  retry_policy != nullptr) {
1049  route_action.retry_policy = virtual_host_retry_policy;
1050  }
1051  // Mark off plugins used in route action.
1052  std::string* cluster_specifier_action =
1053  absl::get_if<XdsRouteConfigResource::Route::RouteAction::
1054  kClusterSpecifierPluginIndex>(
1055  &route_action.action);
1056  if (cluster_specifier_action != nullptr) {
1057  cluster_specifier_plugins.erase(*cluster_specifier_action);
1058  }
1060  routes[j])) {
1061  route.action
1063  }
1064  if (context.use_v3) {
1065  grpc_error_handle error = ParseTypedPerFilterConfig<
1068  context, routes[j],
1072  &route.typed_per_filter_config);
1073  if (!GRPC_ERROR_IS_NONE(error)) return error;
1074  }
1075  vhost.routes.emplace_back(std::move(route));
1076  }
1077  if (vhost.routes.empty()) {
1078  return GRPC_ERROR_CREATE_FROM_STATIC_STRING("No valid routes specified.");
1079  }
1080  // For plugins not used in route action, delete from the update to prevent
1081  // further use.
1082  for (auto& unused_plugin : cluster_specifier_plugins) {
1083  rds_update->cluster_specifier_plugin_map.erase(
1084  std::string(unused_plugin));
1085  }
1086  }
1087  return GRPC_ERROR_NONE;
1088 }
1089 
1090 //
1091 // XdsRouteConfigResourceType
1092 //
1093 
1094 namespace {
1095 
1096 void MaybeLogRouteConfiguration(
1097  const XdsEncodingContext& context,
1098  const envoy_config_route_v3_RouteConfiguration* route_config) {
1099  if (GRPC_TRACE_FLAG_ENABLED(*context.tracer) &&
1101  const upb_MessageDef* msg_type =
1103  char buf[10240];
1104  upb_TextEncode(route_config, msg_type, nullptr, 0, buf, sizeof(buf));
1105  gpr_log(GPR_DEBUG, "[xds_client %p] RouteConfiguration: %s", context.client,
1106  buf);
1107  }
1108 }
1109 
1110 } // namespace
1111 
1114  absl::string_view serialized_resource,
1115  bool /*is_v2*/) const {
1116  // Parse serialized proto.
1118  serialized_resource.data(), serialized_resource.size(), context.arena);
1119  if (resource == nullptr) {
1121  "Can't parse RouteConfiguration resource.");
1122  }
1123  MaybeLogRouteConfiguration(context, resource);
1124  // Validate resource.
1128  auto route_config_data = absl::make_unique<ResourceDataSubclass>();
1130  context, resource, &route_config_data->resource);
1131  if (!GRPC_ERROR_IS_NONE(error)) {
1134  if (GRPC_TRACE_FLAG_ENABLED(*context.tracer)) {
1135  gpr_log(GPR_ERROR, "[xds_client %p] invalid RouteConfiguration %s: %s",
1136  context.client, result.name.c_str(), error_str.c_str());
1137  }
1138  result.resource = absl::InvalidArgumentError(error_str);
1139  } else {
1140  if (GRPC_TRACE_FLAG_ENABLED(*context.tracer)) {
1141  gpr_log(GPR_INFO, "[xds_client %p] parsed RouteConfiguration %s: %s",
1142  context.client, result.name.c_str(),
1143  route_config_data->resource.ToString().c_str());
1144  }
1145  result.resource = std::move(route_config_data);
1146  }
1147  return std::move(result);
1148 }
1149 
1150 } // namespace grpc_core
grpc_core::HeaderMatcher::Type::kSuffix
@ kSuffix
absl::StrSplit
strings_internal::Splitter< typename strings_internal::SelectDelimiter< Delimiter >::type, AllowEmpty, absl::string_view > StrSplit(strings_internal::ConvertibleToStringView text, Delimiter d)
Definition: abseil-cpp/absl/strings/str_split.h:499
grpc_core::XdsRouteConfigResource::Route::RouteAction::ClusterWeight::ToString
std::string ToString() const
Definition: xds_route_config.cc:225
trace.h
grpc_core::HeaderMatcher::Type::kContains
@ kContains
absl::InvalidArgumentError
Status InvalidArgumentError(absl::string_view message)
Definition: third_party/abseil-cpp/absl/status/status.cc:351
envoy_config_route_v3_HeaderMatcher_has_suffix_match
UPB_INLINE bool envoy_config_route_v3_HeaderMatcher_has_suffix_match(const envoy_config_route_v3_HeaderMatcher *msg)
Definition: route_components.upb.h:5606
envoy_config_route_v3_RouteMatch
struct envoy_config_route_v3_RouteMatch envoy_config_route_v3_RouteMatch
Definition: route_components.upb.h:84
envoy_config_route_v3_RouteAction_HashPolicy_FilterState
struct envoy_config_route_v3_RouteAction_HashPolicy_FilterState envoy_config_route_v3_RouteAction_HashPolicy_FilterState
Definition: route_components.upb.h:96
_gevent_test_main.result
result
Definition: _gevent_test_main.py:96
absl::MaxSplits
strings_internal::MaxSplitsImpl< typename strings_internal::SelectDelimiter< Delimiter >::type > MaxSplits(Delimiter delimiter, int limit)
Definition: abseil-cpp/absl/strings/str_split.h:294
GPR_INFO
#define GPR_INFO
Definition: include/grpc/impl/codegen/log.h:56
grpc_core::XdsRouteConfigResource::VirtualHost::typed_per_filter_config
TypedPerFilterConfig typed_per_filter_config
Definition: xds_route_config.h:179
grpc_core::XdsRouteConfigResource::Route::RouteAction::HashPolicy::operator=
HashPolicy & operator=(const HashPolicy &other)
Definition: xds_route_config.cc:154
envoy_config_route_v3_RetryPolicy_retry_back_off
const UPB_INLINE envoy_config_route_v3_RetryPolicy_RetryBackOff * envoy_config_route_v3_RetryPolicy_retry_back_off(const envoy_config_route_v3_RetryPolicy *msg)
Definition: route_components.upb.h:3474
xds_routing.h
envoy_config_route_v3_RouteAction_HashPolicy_header
const UPB_INLINE envoy_config_route_v3_RouteAction_HashPolicy_Header * envoy_config_route_v3_RouteAction_HashPolicy_header(const envoy_config_route_v3_RouteAction_HashPolicy *msg)
Definition: route_components.upb.h:2761
envoy_config_route_v3_HeaderMatcher_has_range_match
UPB_INLINE bool envoy_config_route_v3_HeaderMatcher_has_range_match(const envoy_config_route_v3_HeaderMatcher *msg)
Definition: route_components.upb.h:5573
route.upb.h
grpc_core::XdsRbacEnabled
bool XdsRbacEnabled()
Definition: xds_route_config.cc:82
envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry_key
UPB_INLINE upb_StringView envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry_key(const envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry *msg)
Definition: route_components.upb.h:656
envoy_config_route_v3_HeaderMatcher_safe_regex_match
UPB_INLINE const struct envoy_type_matcher_v3_RegexMatcher * envoy_config_route_v3_HeaderMatcher_safe_regex_match(const envoy_config_route_v3_HeaderMatcher *msg)
Definition: route_components.upb.h:5621
envoy_config_route_v3_RetryPolicy_RetryBackOff_max_interval
UPB_INLINE const struct google_protobuf_Duration * envoy_config_route_v3_RetryPolicy_RetryBackOff_max_interval(const envoy_config_route_v3_RetryPolicy_RetryBackOff *msg)
Definition: route_components.upb.h:3851
envoy_config_route_v3_RouteAction_HashPolicy_FilterState_key
UPB_INLINE upb_StringView envoy_config_route_v3_RouteAction_HashPolicy_FilterState_key(const envoy_config_route_v3_RouteAction_HashPolicy_FilterState *msg)
Definition: route_components.upb.h:3126
regen-readme.it
it
Definition: regen-readme.py:15
GRPC_ERROR_NONE
#define GRPC_ERROR_NONE
Definition: error.h:234
log.h
envoy_config_core_v3_TypedExtensionConfig_name
UPB_INLINE upb_StringView envoy_config_core_v3_TypedExtensionConfig_name(const envoy_config_core_v3_TypedExtensionConfig *msg)
Definition: envoy/config/core/v3/extension.upb.h:65
grpc_core::XdsRouteConfigResource::Route::RouteAction::kClusterSpecifierPluginIndex
static constexpr size_t kClusterSpecifierPluginIndex
Definition: xds_route_config.h:143
absl::str_format_internal::LengthMod::j
@ j
envoy_config_route_v3_VirtualHost_retry_policy
const UPB_INLINE envoy_config_route_v3_RetryPolicy * envoy_config_route_v3_VirtualHost_retry_policy(const envoy_config_route_v3_VirtualHost *msg)
Definition: route_components.upb.h:399
grpc_event_engine::experimental::slice_detail::operator==
bool operator==(const BaseSlice &a, const BaseSlice &b)
Definition: include/grpc/event_engine/slice.h:117
GRPC_STATUS_UNAVAILABLE
@ GRPC_STATUS_UNAVAILABLE
Definition: include/grpc/impl/codegen/status.h:143
envoy_config_route_v3_WeightedCluster_total_weight
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_config_route_v3_WeightedCluster_total_weight(const envoy_config_route_v3_WeightedCluster *msg)
Definition: route_components.upb.h:1173
envoy_config_route_v3_RouteMatch_has_path
UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_path(const envoy_config_route_v3_RouteMatch *msg)
Definition: route_components.upb.h:1499
absl::StrCat
std::string StrCat(const AlphaNum &a, const AlphaNum &b)
Definition: abseil-cpp/absl/strings/str_cat.cc:98
envoy_config_route_v3_RouteAction_MaxStreamDuration_grpc_timeout_header_max
UPB_INLINE const struct google_protobuf_Duration * envoy_config_route_v3_RouteAction_MaxStreamDuration_grpc_timeout_header_max(const envoy_config_route_v3_RouteAction_MaxStreamDuration *msg)
Definition: route_components.upb.h:3330
kUpb_Map_Begin
#define kUpb_Map_Begin
Definition: upb/upb/upb.h:329
rds_update
absl::optional< absl::StatusOr< XdsRouteConfigResource > > rds_update
Definition: xds_server_config_fetcher.cc:231
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
google::protobuf::extension
const Descriptor::ReservedRange const EnumValueDescriptor const MethodDescriptor extension
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2001
grpc_core::XdsRouteConfigResource::Route::RouteAction::HashPolicy::regex
std::unique_ptr< RE2 > regex
Definition: xds_route_config.h:108
grpc_core::XdsRouteConfigResource::Route::matchers
Matchers matchers
Definition: xds_route_config.h:95
envoy_config_route_v3_WeightedCluster
struct envoy_config_route_v3_WeightedCluster envoy_config_route_v3_WeightedCluster
Definition: route_components.upb.h:81
envoy_config_route_v3_Route
struct envoy_config_route_v3_Route envoy_config_route_v3_Route
Definition: route_components.upb.h:79
envoy_config_route_v3_WeightedCluster_ClusterWeight
struct envoy_config_route_v3_WeightedCluster_ClusterWeight envoy_config_route_v3_WeightedCluster_ClusterWeight
Definition: route_components.upb.h:82
route
XdsRouteConfigResource::Route route
Definition: xds_resolver.cc:337
gpr_should_log
GPRAPI void GPRAPI int gpr_should_log(gpr_log_severity severity)
Definition: log.cc:67
grpc_core::HeaderMatcher::Type::kExact
@ kExact
envoy_type_v3_FractionalPercent_HUNDRED
@ envoy_type_v3_FractionalPercent_HUNDRED
Definition: percent.upb.h:31
grpc_core::XdsRouteConfigResourceType::Decode
absl::StatusOr< DecodeResult > Decode(const XdsEncodingContext &context, absl::string_view serialized_resource, bool) const override
Definition: xds_route_config.cc:1113
grpc_core::XdsEncodingContext
Definition: upb_utils.h:39
grpc_core
Definition: call_metric_recorder.h:31
xds_resource_type.h
cluster_name
std::string cluster_name
Definition: xds_cluster_resolver.cc:91
envoy_config_route_v3_RouteMatch_prefix
UPB_INLINE upb_StringView envoy_config_route_v3_RouteMatch_prefix(const envoy_config_route_v3_RouteMatch *msg)
Definition: route_components.upb.h:1496
upb_StringView::data
const char * data
Definition: upb/upb/upb.h:73
upb_MessageDef
Definition: upb/upb/def.c:100
status_util.h
grpc_core::XdsRouteConfigResource::RetryPolicy::RetryBackOff::base_interval
Duration base_interval
Definition: xds_route_config.h:62
match
unsigned char match[65280+2]
Definition: bloaty/third_party/zlib/examples/gun.c:165
string.h
options
double_dict options[]
Definition: capstone_test.c:55
grpc_core::XdsRouteConfigResource::VirtualHost
Definition: xds_route_config.h:176
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_route_v3_HeaderMatcher_exact_match
UPB_INLINE upb_StringView envoy_config_route_v3_HeaderMatcher_exact_match(const envoy_config_route_v3_HeaderMatcher *msg)
Definition: route_components.upb.h:5570
grpc_core::XdsRouteConfigResource::Route::RouteAction::HashPolicy::HashPolicy
HashPolicy()
Definition: xds_route_config.h:111
envoy_config_route_v3_ClusterSpecifierPlugin_extension
UPB_INLINE const struct envoy_config_core_v3_TypedExtensionConfig * envoy_config_route_v3_ClusterSpecifierPlugin_extension(const envoy_config_route_v3_ClusterSpecifierPlugin *msg)
Definition: route.upb.h:353
gpr_free
GPRAPI void gpr_free(void *ptr)
Definition: alloc.cc:51
envoy_config_route_v3_RouteConfiguration_cluster_specifier_plugins
const UPB_INLINE envoy_config_route_v3_ClusterSpecifierPlugin *const * envoy_config_route_v3_RouteConfiguration_cluster_specifier_plugins(const envoy_config_route_v3_RouteConfiguration *msg, size_t *len)
Definition: route.upb.h:170
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
envoy_type_matcher_v3_RegexMatchAndSubstitute_substitution
UPB_INLINE upb_StringView envoy_type_matcher_v3_RegexMatchAndSubstitute_substitution(const envoy_type_matcher_v3_RegexMatchAndSubstitute *msg)
Definition: envoy/type/matcher/v3/regex.upb.h:205
xds_http_filters.h
envoy_config_route_v3_Route_match
const UPB_INLINE envoy_config_route_v3_RouteMatch * envoy_config_route_v3_Route_match(const envoy_config_route_v3_Route *msg)
Definition: route_components.upb.h:777
xds_route_config.h
range_end
uint32_t range_end
Definition: xds_resolver.cc:330
GRPC_STATUS_CANCELLED
@ GRPC_STATUS_CANCELLED
Definition: include/grpc/impl/codegen/status.h:33
xds_resource_type_impl.h
envoy_config_route_v3_VirtualHost
struct envoy_config_route_v3_VirtualHost envoy_config_route_v3_VirtualHost
Definition: route_components.upb.h:76
grpc_core::StringMatcher::Create
static absl::StatusOr< StringMatcher > Create(Type type, absl::string_view matcher, bool case_sensitive=true)
Definition: matchers/matchers.cc:34
setup.name
name
Definition: setup.py:542
env.h
envoy_config_route_v3_RouteAction_MaxStreamDuration
struct envoy_config_route_v3_RouteAction_MaxStreamDuration envoy_config_route_v3_RouteAction_MaxStreamDuration
Definition: route_components.upb.h:99
GRPC_STATUS_DEADLINE_EXCEEDED
@ GRPC_STATUS_DEADLINE_EXCEEDED
Definition: include/grpc/impl/codegen/status.h:53
check_documentation.path
path
Definition: check_documentation.py:57
grpc_core::XdsRouteConfigResource::Route::Matchers::ToString
std::string ToString() const
Definition: xds_route_config.cc:124
envoy_config_core_v3_TypedExtensionConfig
struct envoy_config_core_v3_TypedExtensionConfig envoy_config_core_v3_TypedExtensionConfig
Definition: envoy/config/core/v3/extension.upb.h:24
envoy_config_route_v3_FilterConfig_parse
UPB_INLINE envoy_config_route_v3_FilterConfig * envoy_config_route_v3_FilterConfig_parse(const char *buf, size_t size, upb_Arena *arena)
Definition: route_components.upb.h:5889
grpc_core::XdsRouteConfigResource::Route::RouteAction::HashPolicy
Definition: xds_route_config.h:102
envoy_type_matcher_v3_RegexMatchAndSubstitute_pattern
const UPB_INLINE envoy_type_matcher_v3_RegexMatcher * envoy_type_matcher_v3_RegexMatchAndSubstitute_pattern(const envoy_type_matcher_v3_RegexMatchAndSubstitute *msg)
Definition: envoy/type/matcher/v3/regex.upb.h:199
GRPC_STATUS_RESOURCE_EXHAUSTED
@ GRPC_STATUS_RESOURCE_EXHAUSTED
Definition: include/grpc/impl/codegen/status.h:76
GPR_LOG_SEVERITY_DEBUG
@ GPR_LOG_SEVERITY_DEBUG
Definition: include/grpc/impl/codegen/log.h:46
grpc_core::XdsRouteConfigResource
Definition: xds_route_config.h:53
envoy_config_route_v3_RetryPolicy_RetryBackOff_base_interval
UPB_INLINE const struct google_protobuf_Duration * envoy_config_route_v3_RetryPolicy_RetryBackOff_base_interval(const envoy_config_route_v3_RetryPolicy_RetryBackOff *msg)
Definition: route_components.upb.h:3842
status_helper.h
grpc_core::XdsRouteConfigResource::Route::NonForwardingAction
Definition: xds_route_config.h:160
grpc_core::XdsHttpFilterRegistry::GetFilterForType
static const XdsHttpFilterImpl * GetFilterForType(absl::string_view proto_type_name)
Definition: xds_http_filters.cc:98
map
zval * map
Definition: php/ext/google/protobuf/encode_decode.c:480
grpc_core::HeaderMatcher::Type::kPresent
@ kPresent
GRPC_TRACE_FLAG_ENABLED
#define GRPC_TRACE_FLAG_ENABLED(f)
Definition: debug/trace.h:114
grpc_core::HeaderMatcher
Definition: matchers/matchers.h:79
grpc_core::XdsRouteConfigResource::virtual_hosts
std::vector< VirtualHost > virtual_hosts
Definition: xds_route_config.h:187
envoy_config_route_v3_RetryPolicy
struct envoy_config_route_v3_RetryPolicy envoy_config_route_v3_RetryPolicy
Definition: route_components.upb.h:100
envoy_config_route_v3_VirtualHost_routes
const UPB_INLINE envoy_config_route_v3_Route *const * envoy_config_route_v3_VirtualHost_routes(const envoy_config_route_v3_VirtualHost *msg, size_t *len)
Definition: route_components.upb.h:306
gpr_parse_bool_value
bool gpr_parse_bool_value(const char *value, bool *dst)
Definition: string.cc:325
GRPC_ERROR_CREATE_FROM_VECTOR
#define GRPC_ERROR_CREATE_FROM_VECTOR(desc, error_list)
Definition: error.h:314
envoy_config_route_v3_RouteConfiguration_virtual_hosts
UPB_INLINE const struct envoy_config_route_v3_VirtualHost *const * envoy_config_route_v3_RouteConfiguration_virtual_hosts(const envoy_config_route_v3_RouteConfiguration *msg, size_t *len)
Definition: route.upb.h:92
route.upbdefs.h
base.upb.h
status.h
grpc_core::XdsRouteConfigResource::Route::RouteAction::kWeightedClustersIndex
static constexpr size_t kWeightedClustersIndex
Definition: xds_route_config.h:142
grpc_core::UpbStringToStdString
std::string UpbStringToStdString(const upb_StringView &str)
Definition: upb_utils.h:60
envoy_config_route_v3_Route_route
const UPB_INLINE envoy_config_route_v3_RouteAction * envoy_config_route_v3_Route_route(const envoy_config_route_v3_Route *msg)
Definition: route_components.upb.h:786
retry
void retry(grpc_end2end_test_config config)
Definition: retry.cc:319
google_protobuf_Any
struct google_protobuf_Any google_protobuf_Any
Definition: any.upb.h:24
envoy_config_route_v3_HeaderMatcher_has_contains_match
UPB_INLINE bool envoy_config_route_v3_HeaderMatcher_has_contains_match(const envoy_config_route_v3_HeaderMatcher *msg)
Definition: route_components.upb.h:5624
uint32_t
unsigned int uint32_t
Definition: stdint-msvc2008.h:80
envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_key
UPB_INLINE upb_StringView envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_key(const envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry *msg)
Definition: route_components.upb.h:1431
grpc_core::XdsRouteConfigResource::Route::RouteAction::ToString
std::string ToString() const
Definition: xds_route_config.cc:246
grpc_core::XdsRouteConfigResource::Route::RouteAction::HashPolicy::ToString
std::string ToString() const
Definition: xds_route_config.cc:199
grpc_core::ParseDuration
Duration ParseDuration(const google_protobuf_Duration *proto_duration)
Definition: xds_common_types.h:39
envoy_config_route_v3_WeightedCluster_clusters
const UPB_INLINE envoy_config_route_v3_WeightedCluster_ClusterWeight *const * envoy_config_route_v3_WeightedCluster_clusters(const envoy_config_route_v3_WeightedCluster *msg, size_t *len)
Definition: route_components.upb.h:1158
grpc_core::XdsRouteConfigResource::Route::typed_per_filter_config
TypedPerFilterConfig typed_per_filter_config
Definition: xds_route_config.h:167
envoy_type_v3_FractionalPercent_denominator
UPB_INLINE int32_t envoy_type_v3_FractionalPercent_denominator(const envoy_type_v3_FractionalPercent *msg)
Definition: percent.upb.h:120
gpr_getenv
char * gpr_getenv(const char *name)
errors
const char * errors
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/tokenizer_unittest.cc:841
grpc_core::HeaderMatcher::Type
Type
Definition: matchers/matchers.h:81
grpc_core::Duration::ToString
std::string ToString() const
Definition: src/core/lib/gprpp/time.cc:179
absl::move
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
Definition: abseil-cpp/absl/utility/utility.h:221
GPR_ASSERT
#define GPR_ASSERT(x)
Definition: include/grpc/impl/codegen/log.h:94
envoy_config_route_v3_RouteAction_has_weighted_clusters
UPB_INLINE bool envoy_config_route_v3_RouteAction_has_weighted_clusters(const envoy_config_route_v3_RouteAction *msg)
Definition: route_components.upb.h:2083
envoy_config_core_v3_RuntimeFractionalPercent_default_value
UPB_INLINE const struct envoy_type_v3_FractionalPercent * envoy_config_core_v3_RuntimeFractionalPercent_default_value(const envoy_config_core_v3_RuntimeFractionalPercent *msg)
Definition: base.upb.h:1706
envoy_config_route_v3_VirtualHost_typed_per_filter_config_next
const UPB_INLINE envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry * envoy_config_route_v3_VirtualHost_typed_per_filter_config_next(const envoy_config_route_v3_VirtualHost *msg, size_t *iter)
Definition: route_components.upb.h:390
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
int64_t
signed __int64 int64_t
Definition: stdint-msvc2008.h:89
absl::string_view::size
constexpr size_type size() const noexcept
Definition: abseil-cpp/absl/strings/string_view.h:277
envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry_value
UPB_INLINE const struct google_protobuf_Any * envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry_value(const envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry *msg)
Definition: route_components.upb.h:664
gen_stats_data.c_str
def c_str(s, encoding='ascii')
Definition: gen_stats_data.py:38
max
int max
Definition: bloaty/third_party/zlib/examples/enough.c:170
upb_StringView::size
size_t size
Definition: upb/upb/upb.h:74
grpc_core::XdsRouteConfigResource::TypedPerFilterConfig
std::map< std::string, XdsHttpFilterImpl::FilterConfig > TypedPerFilterConfig
Definition: xds_route_config.h:55
envoy_type_v3_FractionalPercent_MILLION
@ envoy_type_v3_FractionalPercent_MILLION
Definition: percent.upb.h:33
envoy_config_route_v3_FilterConfig_is_optional
UPB_INLINE bool envoy_config_route_v3_FilterConfig_is_optional(const envoy_config_route_v3_FilterConfig *msg)
Definition: route_components.upb.h:5927
envoy_config_route_v3_VirtualHost_domains
UPB_INLINE upb_StringView const * envoy_config_route_v3_VirtualHost_domains(const envoy_config_route_v3_VirtualHost *msg, size_t *len)
Definition: route_components.upb.h:297
envoy_type_v3_Int64Range_end
UPB_INLINE int64_t envoy_type_v3_Int64Range_end(const envoy_type_v3_Int64Range *msg)
Definition: range.upb.h:75
xds_common_types.h
grpc_core::StatusToString
std::string StatusToString(const absl::Status &status)
Definition: status_helper.cc:282
envoy_config_route_v3_RouteMatch_case_sensitive
UPB_INLINE const struct google_protobuf_BoolValue * envoy_config_route_v3_RouteMatch_case_sensitive(const envoy_config_route_v3_RouteMatch *msg)
Definition: route_components.upb.h:1514
grpc_core::XdsClusterSpecifierPluginRegistry::GetPluginForType
static const XdsClusterSpecifierPluginImpl * GetPluginForType(absl::string_view config_proto_type_name)
Definition: xds_cluster_specifier_plugin.cc:124
envoy_config_route_v3_RouteConfiguration
struct envoy_config_route_v3_RouteConfiguration envoy_config_route_v3_RouteConfiguration
Definition: route.upb.h:26
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
envoy_config_route_v3_RouteAction_HashPolicy
struct envoy_config_route_v3_RouteAction_HashPolicy envoy_config_route_v3_RouteAction_HashPolicy
Definition: route_components.upb.h:91
grpc_core::XdsRouteConfigResource::Route::RouteAction::hash_policies
std::vector< HashPolicy > hash_policies
Definition: xds_route_config.h:137
envoy_config_route_v3_RouteAction
struct envoy_config_route_v3_RouteAction envoy_config_route_v3_RouteAction
Definition: route_components.upb.h:89
grpc_core::XdsRouteConfigResource::ToString
std::string ToString() const
Definition: xds_route_config.cc:306
absl::get_if
constexpr absl::add_pointer_t< variant_alternative_t< I, variant< Types... > > > get_if(variant< Types... > *v) noexcept
Definition: abseil-cpp/absl/types/variant.h:372
envoy_config_core_v3_RuntimeFractionalPercent
struct envoy_config_core_v3_RuntimeFractionalPercent envoy_config_core_v3_RuntimeFractionalPercent
Definition: base.upb.h:69
wrappers.upb.h
matchers.h
grpc_core::XdsRouteConfigResource::VirtualHost::routes
std::vector< Route > routes
Definition: xds_route_config.h:178
header
struct absl::base_internal::@2940::AllocList::Header header
absl::optional
Definition: abseil-cpp/absl/types/internal/optional.h:61
envoy_config_route_v3_RetryPolicy_retry_on
UPB_INLINE upb_StringView envoy_config_route_v3_RetryPolicy_retry_on(const envoy_config_route_v3_RetryPolicy *msg)
Definition: route_components.upb.h:3417
envoy_config_route_v3_Route_has_non_forwarding_action
UPB_INLINE bool envoy_config_route_v3_Route_has_non_forwarding_action(const envoy_config_route_v3_Route *msg)
Definition: route_components.upb.h:903
envoy_config_route_v3_RouteMatch_path
UPB_INLINE upb_StringView envoy_config_route_v3_RouteMatch_path(const envoy_config_route_v3_RouteMatch *msg)
Definition: route_components.upb.h:1505
envoy_config_route_v3_ClusterSpecifierPlugin_is_optional
UPB_INLINE bool envoy_config_route_v3_ClusterSpecifierPlugin_is_optional(const envoy_config_route_v3_ClusterSpecifierPlugin *msg)
Definition: route.upb.h:359
envoy_config_route_v3_RouteAction_retry_policy
const UPB_INLINE envoy_config_route_v3_RetryPolicy * envoy_config_route_v3_RouteAction_retry_policy(const envoy_config_route_v3_RouteAction *msg)
Definition: route_components.upb.h:2140
grpc_core::StringMatcher::Type
Type
Definition: matchers/matchers.h:34
time.h
grpc_core::XdsRlsEnabled
bool XdsRlsEnabled()
Definition: xds_route_config.cc:91
envoy_config_route_v3_HeaderMatcher_has_prefix_match
UPB_INLINE bool envoy_config_route_v3_HeaderMatcher_has_prefix_match(const envoy_config_route_v3_HeaderMatcher *msg)
Definition: route_components.upb.h:5597
regex.upb.h
percent.upb.h
gen_gtest_pred_impl.HEADER
HEADER
Definition: bloaty/third_party/googletest/googletest/scripts/gen_gtest_pred_impl.py:59
error.h
envoy_config_route_v3_RouteMatch_runtime_fraction
UPB_INLINE const struct envoy_config_core_v3_RuntimeFractionalPercent * envoy_config_route_v3_RouteMatch_runtime_fraction(const envoy_config_route_v3_RouteMatch *msg)
Definition: route_components.upb.h:1550
GPR_ERROR
#define GPR_ERROR
Definition: include/grpc/impl/codegen/log.h:57
envoy_config_route_v3_RouteAction_max_stream_duration
const UPB_INLINE envoy_config_route_v3_RouteAction_MaxStreamDuration * envoy_config_route_v3_RouteAction_max_stream_duration(const envoy_config_route_v3_RouteAction *msg)
Definition: route_components.upb.h:2311
weight
uint32_t weight
Definition: weighted_target.cc:84
absl::holds_alternative
constexpr bool holds_alternative(const variant< Types... > &v) noexcept
Definition: abseil-cpp/absl/types/variant.h:264
envoy_config_route_v3_RouteAction_HashPolicy_filter_state
const UPB_INLINE envoy_config_route_v3_RouteAction_HashPolicy_FilterState * envoy_config_route_v3_RouteAction_HashPolicy_filter_state(const envoy_config_route_v3_RouteAction_HashPolicy *msg)
Definition: route_components.upb.h:2803
grpc_core::XdsRouteConfigResource::Route
Definition: xds_route_config.h:80
xds_cluster_specifier_plugin.h
stdint.h
grpc_core::XdsRouteConfigResource::cluster_specifier_plugin_map
std::map< std::string, std::string > cluster_specifier_plugin_map
Definition: xds_route_config.h:190
envoy_config_route_v3_Route_TypedPerFilterConfigEntry_value
UPB_INLINE const struct google_protobuf_Any * envoy_config_route_v3_Route_TypedPerFilterConfigEntry_value(const envoy_config_route_v3_Route_TypedPerFilterConfigEntry *msg)
Definition: route_components.upb.h:1104
envoy_type_v3_FractionalPercent_TEN_THOUSAND
@ envoy_type_v3_FractionalPercent_TEN_THOUSAND
Definition: percent.upb.h:32
grpc_core::HeaderMatcher::Type::kPrefix
@ kPrefix
grpc_core::XdsRouteConfigResource::Route::RouteAction::ClusterWeight
Definition: xds_route_config.h:125
envoy_config_route_v3_RouteAction_has_cluster_specifier_plugin
UPB_INLINE bool envoy_config_route_v3_RouteAction_has_cluster_specifier_plugin(const envoy_config_route_v3_RouteAction *msg)
Definition: route_components.upb.h:2314
GRPC_ERROR_CREATE_FROM_STATIC_STRING
#define GRPC_ERROR_CREATE_FROM_STATIC_STRING(desc)
Definition: error.h:291
google_benchmark.example.empty
def empty(state)
Definition: example.py:31
grpc_core::XdsRouteConfigResource::RetryPolicy::RetryBackOff::ToString
std::string ToString() const
Definition: xds_route_config.cc:103
envoy_type_v3_FractionalPercent
struct envoy_type_v3_FractionalPercent envoy_type_v3_FractionalPercent
Definition: percent.upb.h:26
envoy_config_route_v3_RouteAction_HashPolicy_terminal
UPB_INLINE bool envoy_config_route_v3_RouteAction_HashPolicy_terminal(const envoy_config_route_v3_RouteAction_HashPolicy *msg)
Definition: route_components.upb.h:2785
grpc_core::XdsRouteConfigResource::Route::RouteAction::HashPolicy::regex_substitution
std::string regex_substitution
Definition: xds_route_config.h:109
grpc_core::XdsRouteConfigResource::RetryPolicy::retry_back_off
RetryBackOff retry_back_off
Definition: xds_route_config.h:71
envoy_type_v3_FractionalPercent_DenominatorType
envoy_type_v3_FractionalPercent_DenominatorType
Definition: percent.upb.h:30
route_components.upb.h
google_protobuf_UInt32Value_value
UPB_INLINE uint32_t google_protobuf_UInt32Value_value(const google_protobuf_UInt32Value *msg)
Definition: wrappers.upb.h:297
grpc_core::XdsRouteConfigResource::RetryPolicy::num_retries
uint32_t num_retries
Definition: xds_route_config.h:59
envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry
struct envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry
Definition: route_components.upb.h:83
envoy_type_matcher_v3_RegexMatcher
struct envoy_type_matcher_v3_RegexMatcher envoy_type_matcher_v3_RegexMatcher
Definition: envoy/type/matcher/v3/regex.upb.h:26
envoy_config_route_v3_RouteMatch_safe_regex
UPB_INLINE const struct envoy_type_matcher_v3_RegexMatcher * envoy_config_route_v3_RouteMatch_safe_regex(const envoy_config_route_v3_RouteMatch *msg)
Definition: route_components.upb.h:1559
envoy_config_route_v3_RouteAction_MaxStreamDuration_max_stream_duration
UPB_INLINE const struct google_protobuf_Duration * envoy_config_route_v3_RouteAction_MaxStreamDuration_max_stream_duration(const envoy_config_route_v3_RouteAction_MaxStreamDuration *msg)
Definition: route_components.upb.h:3321
envoy_config_route_v3_HeaderMatcher_present_match
UPB_INLINE bool envoy_config_route_v3_HeaderMatcher_present_match(const envoy_config_route_v3_HeaderMatcher *msg)
Definition: route_components.upb.h:5588
value
const char * value
Definition: hpack_parser_table.cc:165
envoy_config_route_v3_Route_typed_per_filter_config_next
const UPB_INLINE envoy_config_route_v3_Route_TypedPerFilterConfigEntry * envoy_config_route_v3_Route_typed_per_filter_config_next(const envoy_config_route_v3_Route *msg, size_t *iter)
Definition: route_components.upb.h:867
envoy_config_route_v3_RouteMatch_has_safe_regex
UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_safe_regex(const envoy_config_route_v3_RouteMatch *msg)
Definition: route_components.upb.h:1553
envoy_config_route_v3_WeightedCluster_ClusterWeight_weight
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_config_route_v3_WeightedCluster_ClusterWeight_weight(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg)
Definition: route_components.upb.h:1268
envoy_config_route_v3_RouteConfiguration_parse
UPB_INLINE envoy_config_route_v3_RouteConfiguration * envoy_config_route_v3_RouteConfiguration_parse(const char *buf, size_t size, upb_Arena *arena)
Definition: route.upb.h:54
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
envoy_type_v3_Int64Range
struct envoy_type_v3_Int64Range envoy_type_v3_Int64Range
Definition: range.upb.h:26
routes
std::vector< Route > routes
Definition: xds_server_config_fetcher.cc:338
grpc_core::Duration::Milliseconds
static constexpr Duration Milliseconds(int64_t millis)
Definition: src/core/lib/gprpp/time.h:155
envoy_config_route_v3_Route_TypedPerFilterConfigEntry_key
UPB_INLINE upb_StringView envoy_config_route_v3_Route_TypedPerFilterConfigEntry_key(const envoy_config_route_v3_Route_TypedPerFilterConfigEntry *msg)
Definition: route_components.upb.h:1096
contents
string_view contents
Definition: elf.cc:597
absl::StatusOr::ok
ABSL_MUST_USE_RESULT bool ok() const
Definition: abseil-cpp/absl/status/statusor.h:491
absl_status_to_grpc_error
grpc_error_handle absl_status_to_grpc_error(absl::Status status)
Definition: error_utils.cc:167
key
const char * key
Definition: hpack_parser_table.cc:164
envoy_config_route_v3_Route_TypedPerFilterConfigEntry
struct envoy_config_route_v3_Route_TypedPerFilterConfigEntry envoy_config_route_v3_Route_TypedPerFilterConfigEntry
Definition: route_components.upb.h:80
upb_StringView
Definition: upb/upb/upb.h:72
envoy_config_route_v3_FilterConfig_config
UPB_INLINE const struct google_protobuf_Any * envoy_config_route_v3_FilterConfig_config(const envoy_config_route_v3_FilterConfig *msg)
Definition: route_components.upb.h:5921
grpc_core::HeaderMatcher::Type::kSafeRegex
@ kSafeRegex
def.h
envoy_config_route_v3_RouteConfiguration_getmsgdef
const UPB_INLINE upb_MessageDef * envoy_config_route_v3_RouteConfiguration_getmsgdef(upb_DefPool *s)
Definition: route.upbdefs.h:24
grpc_core::XdsRouteConfigResource::Route::RouteAction::kClusterIndex
static constexpr size_t kClusterIndex
Definition: xds_route_config.h:141
grpc_error_std_string
std::string grpc_error_std_string(grpc_error_handle error)
Definition: error.cc:944
grpc_core::XdsRouteConfigResource::Route::RouteAction::HashPolicy::header_name
std::string header_name
Definition: xds_route_config.h:107
grpc_core::XdsRouteConfigResource::VirtualHost::domains
std::vector< std::string > domains
Definition: xds_route_config.h:177
grpc_core::XdsRouteConfigResource::Route::RouteAction::retry_policy
absl::optional< RetryPolicy > retry_policy
Definition: xds_route_config.h:138
GRPC_ERROR_CREATE_FROM_CPP_STRING
#define GRPC_ERROR_CREATE_FROM_CPP_STRING(desc)
Definition: error.h:297
envoy_config_route_v3_HeaderMatcher_suffix_match
UPB_INLINE upb_StringView envoy_config_route_v3_HeaderMatcher_suffix_match(const envoy_config_route_v3_HeaderMatcher *msg)
Definition: route_components.upb.h:5612
alloc.h
grpc_core::HeaderMatcher::Create
static absl::StatusOr< HeaderMatcher > Create(absl::string_view name, Type type, absl::string_view matcher, int64_t range_start=0, int64_t range_end=0, bool present_match=false, bool invert_match=false)
Definition: matchers/matchers.cc:157
codes
int codes(struct state *s, const struct huffman *lencode, const struct huffman *distcode)
Definition: bloaty/third_party/zlib/contrib/puff/puff.c:436
range.upb.h
google_protobuf_Any_type_url
UPB_INLINE upb_StringView google_protobuf_Any_type_url(const google_protobuf_Any *msg)
Definition: any.upb.h:63
envoy_config_route_v3_RouteMatch_headers
const UPB_INLINE envoy_config_route_v3_HeaderMatcher *const * envoy_config_route_v3_RouteMatch_headers(const envoy_config_route_v3_RouteMatch *msg, size_t *len)
Definition: route_components.upb.h:1523
envoy_config_route_v3_HeaderMatcher_has_present_match
UPB_INLINE bool envoy_config_route_v3_HeaderMatcher_has_present_match(const envoy_config_route_v3_HeaderMatcher *msg)
Definition: route_components.upb.h:5582
prefix
static const char prefix[]
Definition: head_of_line_blocking.cc:28
envoy_config_route_v3_HeaderMatcher_invert_match
UPB_INLINE bool envoy_config_route_v3_HeaderMatcher_invert_match(const envoy_config_route_v3_HeaderMatcher *msg)
Definition: route_components.upb.h:5594
grpc_core::XdsRouteConfigResource::Route::ToString
std::string ToString() const
Definition: xds_route_config.cc:277
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
grpc_core::StringMatcher::Type::kExact
@ kExact
grpc_core::XdsRouteConfigResource::Route::RouteAction
Definition: xds_route_config.h:101
envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_value
UPB_INLINE const struct google_protobuf_Any * envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_value(const envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry *msg)
Definition: route_components.upb.h:1439
envoy_config_route_v3_ClusterSpecifierPlugin
struct envoy_config_route_v3_ClusterSpecifierPlugin envoy_config_route_v3_ClusterSpecifierPlugin
Definition: route.upb.h:27
GRPC_ERROR_UNREF
#define GRPC_ERROR_UNREF(err)
Definition: error.h:262
grpc_core::ExtractExtensionTypeName
absl::StatusOr< ExtractExtensionTypeNameResult > ExtractExtensionTypeName(const XdsEncodingContext &context, const google_protobuf_Any *any)
Definition: xds_common_types.cc:377
config_s
Definition: bloaty/third_party/zlib/deflate.c:120
envoy_config_route_v3_RouteAction_HashPolicy_Header_regex_rewrite
UPB_INLINE const struct envoy_type_matcher_v3_RegexMatchAndSubstitute * envoy_config_route_v3_RouteAction_HashPolicy_Header_regex_rewrite(const envoy_config_route_v3_RouteAction_HashPolicy_Header *msg)
Definition: route_components.upb.h:2914
envoy_config_core_v3_TypedExtensionConfig_typed_config
UPB_INLINE const struct google_protobuf_Any * envoy_config_core_v3_TypedExtensionConfig_typed_config(const envoy_config_core_v3_TypedExtensionConfig *msg)
Definition: envoy/config/core/v3/extension.upb.h:74
envoy_config_route_v3_RouteConfiguration_name
UPB_INLINE upb_StringView envoy_config_route_v3_RouteConfiguration_name(const envoy_config_route_v3_RouteConfiguration *msg)
Definition: route.upb.h:83
envoy_config_route_v3_RouteAction_HashPolicy_Header
struct envoy_config_route_v3_RouteAction_HashPolicy_Header envoy_config_route_v3_RouteAction_HashPolicy_Header
Definition: route_components.upb.h:92
grpc_core::StringMatcher::Type::kSafeRegex
@ kSafeRegex
grpc_core::XdsRouteConfigResource::Parse
static grpc_error_handle Parse(const XdsEncodingContext &context, const envoy_config_route_v3_RouteConfiguration *route_config, XdsRouteConfigResource *rds_update)
Definition: xds_route_config.cc:945
envoy_config_route_v3_HeaderMatcher
struct envoy_config_route_v3_HeaderMatcher envoy_config_route_v3_HeaderMatcher
Definition: route_components.upb.h:125
envoy_config_route_v3_HeaderMatcher_has_exact_match
UPB_INLINE bool envoy_config_route_v3_HeaderMatcher_has_exact_match(const envoy_config_route_v3_HeaderMatcher *msg)
Definition: route_components.upb.h:5564
envoy_config_route_v3_HeaderMatcher_contains_match
UPB_INLINE upb_StringView envoy_config_route_v3_HeaderMatcher_contains_match(const envoy_config_route_v3_HeaderMatcher *msg)
Definition: route_components.upb.h:5630
envoy_config_route_v3_RouteMatch_has_prefix
UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_prefix(const envoy_config_route_v3_RouteMatch *msg)
Definition: route_components.upb.h:1490
envoy_type_matcher_v3_RegexMatcher_regex
UPB_INLINE upb_StringView envoy_type_matcher_v3_RegexMatcher_regex(const envoy_type_matcher_v3_RegexMatcher *msg)
Definition: envoy/type/matcher/v3/regex.upb.h:87
grpc_core::XdsRouteConfigResource::Route::RouteAction::max_stream_duration
absl::optional< Duration > max_stream_duration
Definition: xds_route_config.h:150
GPR_DEBUG
#define GPR_DEBUG
Definition: include/grpc/impl/codegen/log.h:55
GRPC_STATUS_INTERNAL
@ GRPC_STATUS_INTERNAL
Definition: include/grpc/impl/codegen/status.h:129
absl::string_view::empty
constexpr bool empty() const noexcept
Definition: abseil-cpp/absl/strings/string_view.h:292
envoy_config_route_v3_HeaderMatcher_name
UPB_INLINE upb_StringView envoy_config_route_v3_HeaderMatcher_name(const envoy_config_route_v3_HeaderMatcher *msg)
Definition: route_components.upb.h:5561
context
grpc::ClientContext context
Definition: istio_echo_server_lib.cc:61
grpc_core::XdsRouteConfigResource::Route::RouteAction::HashPolicy::type
Type type
Definition: xds_route_config.h:104
Duration
Definition: bloaty/third_party/protobuf/src/google/protobuf/duration.pb.h:69
envoy_config_route_v3_RouteAction_hash_policy
const UPB_INLINE envoy_config_route_v3_RouteAction_HashPolicy *const * envoy_config_route_v3_RouteAction_hash_policy(const envoy_config_route_v3_RouteAction *msg, size_t *len)
Definition: route_components.upb.h:2173
grpc_core::HeaderMatcher::Type::kRange
@ kRange
absl::StatusOr::value
const T & value() const &ABSL_ATTRIBUTE_LIFETIME_BOUND
Definition: abseil-cpp/absl/status/statusor.h:687
duration.upb.h
envoy_config_route_v3_WeightedCluster_ClusterWeight_name
UPB_INLINE upb_StringView envoy_config_route_v3_WeightedCluster_ClusterWeight_name(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg)
Definition: route_components.upb.h:1259
any.upb.h
envoy_config_route_v3_HeaderMatcher_prefix_match
UPB_INLINE upb_StringView envoy_config_route_v3_HeaderMatcher_prefix_match(const envoy_config_route_v3_HeaderMatcher *msg)
Definition: route_components.upb.h:5603
envoy_config_route_v3_Route_has_route
UPB_INLINE bool envoy_config_route_v3_Route_has_route(const envoy_config_route_v3_Route *msg)
Definition: route_components.upb.h:780
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
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
code
Definition: bloaty/third_party/zlib/contrib/infback9/inftree9.h:24
envoy_config_route_v3_RouteAction_has_cluster
UPB_INLINE bool envoy_config_route_v3_RouteAction_has_cluster(const envoy_config_route_v3_RouteAction *msg)
Definition: route_components.upb.h:2065
envoy_type_v3_Int64Range_start
UPB_INLINE int64_t envoy_type_v3_Int64Range_start(const envoy_type_v3_Int64Range *msg)
Definition: range.upb.h:69
grpc_error
Definition: error_internal.h:42
upb_utils.h
size
voidpf void uLong size
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
envoy_type_v3_FractionalPercent_numerator
UPB_INLINE uint32_t envoy_type_v3_FractionalPercent_numerator(const envoy_type_v3_FractionalPercent *msg)
Definition: percent.upb.h:114
grpc_core::StringMatcher::Type::kPrefix
@ kPrefix
envoy_config_route_v3_HeaderMatcher_range_match
UPB_INLINE const struct envoy_type_v3_Int64Range * envoy_config_route_v3_HeaderMatcher_range_match(const envoy_config_route_v3_HeaderMatcher *msg)
Definition: route_components.upb.h:5579
grpc_core::XdsRouteConfigResource::Route::RouteAction::action
absl::variant< std::string, std::vector< ClusterWeight >, std::string > action
Definition: xds_route_config.h:145
domains
std::vector< std::string > domains
Definition: xds_server_config_fetcher.cc:337
grpc_core::XdsRouteConfigResource::RetryPolicy::ToString
std::string ToString() const
Definition: xds_route_config.cc:113
envoy_config_route_v3_RouteAction_weighted_clusters
const UPB_INLINE envoy_config_route_v3_WeightedCluster * envoy_config_route_v3_RouteAction_weighted_clusters(const envoy_config_route_v3_RouteAction *msg)
Definition: route_components.upb.h:2089
absl::string_view::data
constexpr const_pointer data() const noexcept
Definition: abseil-cpp/absl/strings/string_view.h:336
envoy_config_route_v3_RouteAction_HashPolicy_Header_header_name
UPB_INLINE upb_StringView envoy_config_route_v3_RouteAction_HashPolicy_Header_header_name(const envoy_config_route_v3_RouteAction_HashPolicy_Header *msg)
Definition: route_components.upb.h:2905
extension.upb.h
text_encode.h
grpc_core::UpbStringToAbsl
absl::string_view UpbStringToAbsl(const upb_StringView &str)
Definition: upb_utils.h:56
envoy_config_route_v3_RouteAction_cluster
UPB_INLINE upb_StringView envoy_config_route_v3_RouteAction_cluster(const envoy_config_route_v3_RouteAction *msg)
Definition: route_components.upb.h:2071
google_protobuf_BoolValue_value
UPB_INLINE bool google_protobuf_BoolValue_value(const google_protobuf_BoolValue *msg)
Definition: wrappers.upb.h:339
grpc_core::XdsRouting::IsValidDomainPattern
static bool IsValidDomainPattern(absl::string_view domain_pattern)
Definition: xds_routing.cc:178
envoy_config_route_v3_RetryPolicy_num_retries
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_config_route_v3_RetryPolicy_num_retries(const envoy_config_route_v3_RetryPolicy *msg)
Definition: route_components.upb.h:3426
envoy_config_route_v3_RouteAction_cluster_specifier_plugin
UPB_INLINE upb_StringView envoy_config_route_v3_RouteAction_cluster_specifier_plugin(const envoy_config_route_v3_RouteAction *msg)
Definition: route_components.upb.h:2320
grpc_core::XdsRouteConfigResource::RetryPolicy::RetryBackOff::max_interval
Duration max_interval
Definition: xds_route_config.h:63
envoy_config_route_v3_HeaderMatcher_has_safe_regex_match
UPB_INLINE bool envoy_config_route_v3_HeaderMatcher_has_safe_regex_match(const envoy_config_route_v3_HeaderMatcher *msg)
Definition: route_components.upb.h:5615
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
absl::StatusOr::status
const Status & status() const &
Definition: abseil-cpp/absl/status/statusor.h:678
error_utils.h
envoy_type_matcher_v3_RegexMatchAndSubstitute
struct envoy_type_matcher_v3_RegexMatchAndSubstitute envoy_type_matcher_v3_RegexMatchAndSubstitute
Definition: envoy/type/matcher/v3/regex.upb.h:28
envoy_config_route_v3_WeightedCluster_ClusterWeight_typed_per_filter_config_next
const UPB_INLINE envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry * envoy_config_route_v3_WeightedCluster_ClusterWeight_typed_per_filter_config_next(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t *iter)
Definition: route_components.upb.h:1322
envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry
struct envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry
Definition: route_components.upb.h:77
GRPC_ERROR_IS_NONE
#define GRPC_ERROR_IS_NONE(err)
Definition: error.h:241
envoy_config_route_v3_RetryPolicy_RetryBackOff
struct envoy_config_route_v3_RetryPolicy_RetryBackOff envoy_config_route_v3_RetryPolicy_RetryBackOff
Definition: route_components.upb.h:103
port_platform.h
envoy_config_route_v3_RouteMatch_query_parameters
const UPB_INLINE envoy_config_route_v3_QueryParameterMatcher *const * envoy_config_route_v3_RouteMatch_query_parameters(const envoy_config_route_v3_RouteMatch *msg, size_t *len)
Definition: route_components.upb.h:1532


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