Go to the documentation of this file.
28 #include <type_traits>
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"
87 return parse_succeeded && parsed_value;
96 return parse_succeeded && parsed_value;
128 for (
const HeaderMatcher& header_matcher : header_matchers) {
129 contents.push_back(header_matcher.ToString());
131 if (fraction_per_million.has_value()) {
133 fraction_per_million.value()));
145 header_name(other.header_name),
146 regex_substitution(other.regex_substitution) {
147 if (other.
regex !=
nullptr) {
149 absl::make_unique<RE2>(other.
regex->pattern(), other.
regex->options());
158 if (other.
regex !=
nullptr) {
160 absl::make_unique<RE2>(other.
regex->pattern(), other.
regex->options());
169 header_name(
std::move(other.header_name)),
171 regex_substitution(
std::move(other.regex_substitution)) {}
177 header_name =
std::move(other.header_name);
179 regex_substitution =
std::move(other.regex_substitution);
185 if (
type != other.
type)
return false;
187 if (regex ==
nullptr) {
188 if (other.
regex !=
nullptr)
return false;
190 if (other.
regex ==
nullptr)
return false;
192 regex->pattern() == other.
regex->pattern() &&
206 case Type::CHANNEL_ID:
207 contents.push_back(
"type=CHANNEL_ID");
214 "Header %s:/%s/%s", header_name,
215 (regex ==
nullptr) ?
"" : regex->pattern(), regex_substitution));
230 std::vector<std::string> parts;
233 const auto&
config = p.second;
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());
265 absl::get<kClusterSpecifierPluginIndex>(
action)));
281 absl::get_if<XdsRouteConfigResource::Route::RouteAction>(&
action);
282 if (route_action !=
nullptr) {
286 contents.push_back(
"non_forwarding_action={}");
288 contents.push_back(
"unknown_action={}");
291 contents.push_back(
"typed_per_filter_config={");
294 const auto&
config = p.second;
307 std::vector<std::string> parts;
316 parts.push_back(
" {\n");
317 parts.push_back(
route.ToString());
318 parts.push_back(
"\n }\n");
320 parts.push_back(
" ]\n");
321 parts.push_back(
" typed_per_filter_config={\n");
322 for (
const auto& p : vhost.typed_per_filter_config) {
324 const auto&
config = p.second;
327 parts.push_back(
" }\n");
328 parts.push_back(
"]\n");
330 parts.push_back(
"cluster_specifier_plugins={\n");
334 parts.push_back(
"}");
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]);
356 rds_update->cluster_specifier_plugin_map.end()) {
358 "Duplicated definition of cluster_specifier_plugin ",
name));
362 if (any ==
nullptr) {
364 "Could not obtrain TypedExtensionConfig for plugin config.");
367 if (!plugin_type.ok()) {
371 cluster_specifier_plugin[i]);
372 const XdsClusterSpecifierPluginImpl* cluster_specifier_plugin_impl =
375 if (cluster_specifier_plugin_impl ==
nullptr) {
378 "Unknown ClusterSpecifierPlugin type ", plugin_type->type));
383 cluster_specifier_plugin_impl->GenerateLoadBalancingPolicyConfig(
398 XdsRouteConfigResource::Route*
route,
bool* ignore_route) {
399 auto* case_sensitive_ptr =
401 bool case_sensitive =
true;
402 if (case_sensitive_ptr !=
nullptr) {
416 *ignore_route =
true;
419 std::vector<absl::string_view> prefix_elements =
421 if (prefix_elements.size() > 2) {
423 *ignore_route =
true;
425 }
else if (prefix_elements.size() == 2 && prefix_elements[0].empty()) {
427 *ignore_route =
true;
438 *ignore_route =
true;
441 if (
path[0] !=
'/') {
444 *ignore_route =
true;
447 std::vector<absl::string_view> path_elements =
449 if (path_elements.size() != 2) {
452 *ignore_route =
true;
454 }
else if (path_elements[0].
empty()) {
457 *ignore_route =
true;
459 }
else if (path_elements[1].
empty()) {
462 *ignore_route =
true;
476 "Invalid route path specifier specified.");
480 if (!string_matcher.
ok()) {
490 XdsRouteConfigResource::Route*
route) {
494 for (
size_t i = 0;
i <
size; ++
i) {
502 bool present_match =
false;
538 "Invalid route header matcher specified.");
544 present_match, invert_match);
545 if (!header_matcher.
ok()) {
549 route->matchers.header_matchers.emplace_back(
557 XdsRouteConfigResource::Route*
route) {
560 if (runtime_fraction !=
nullptr) {
564 if (fraction !=
nullptr) {
566 const auto denominator =
570 switch (denominator) {
581 "Unknown denominator type");
583 route->matchers.fraction_per_million = numerator;
589 template <
typename ParentType,
typename EntryType>
591 const XdsEncodingContext&
context,
const ParentType* parent,
592 const EntryType* (*entry_func)(
const ParentType*,
size_t*),
598 const auto* filter_entry = entry_func(parent, &filter_it);
599 if (filter_entry ==
nullptr)
break;
608 if (filter_type.
empty()) {
612 bool is_optional =
false;
614 "type.googleapis.com/envoy.config.route.v3.FilterConfig") {
618 if (filter_config ==
nullptr) {
625 if (any ==
nullptr) {
626 if (is_optional)
continue;
635 const XdsHttpFilterImpl* filter_impl =
637 if (filter_impl ==
nullptr) {
638 if (is_optional)
continue;
643 filter_impl->GenerateFilterConfigOverride(
645 if (!filter_config.
ok()) {
647 "filter config for type ",
type->type,
656 const XdsEncodingContext&
context,
659 std::vector<grpc_error_handle>
errors;
660 XdsRouteConfigResource::RetryPolicy retry_to_return;
665 if (
code ==
"cancelled") {
667 }
else if (
code ==
"deadline-exceeded") {
669 }
else if (
code ==
"internal") {
671 }
else if (
code ==
"resource-exhausted") {
673 }
else if (
code ==
"unavailable") {
684 if (num_retries !=
nullptr) {
686 if (num_retries_value == 0) {
688 "RouteAction RetryPolicy num_retries set to invalid value 0."));
690 retry_to_return.num_retries = num_retries_value;
693 retry_to_return.num_retries = 1;
697 if (backoff !=
nullptr) {
700 if (base_interval ==
nullptr) {
702 "RouteAction RetryPolicy RetryBackoff missing base interval."));
704 retry_to_return.retry_back_off.base_interval =
710 if (max_interval !=
nullptr) {
714 max = 10 * retry_to_return.retry_back_off.base_interval;
716 retry_to_return.retry_back_off.max_interval =
max;
722 *
retry = retry_to_return;
731 const XdsEncodingContext&
context,
736 XdsRouteConfigResource::Route::RouteAction*
route,
bool* ignore_route) {
745 "RouteAction cluster contains empty cluster name.");
752 std::vector<XdsRouteConfigResource::Route::RouteAction::ClusterWeight>
753 action_weighted_clusters;
762 size_t clusters_size;
767 for (
size_t j = 0;
j < clusters_size; ++
j) {
769 cluster_weight = clusters[
j];
770 XdsRouteConfigResource::Route::RouteAction::ClusterWeight
cluster;
776 "RouteAction weighted_cluster cluster contains empty cluster "
784 "RouteAction weighted_cluster cluster missing weight");
787 if (
cluster.weight == 0)
continue;
788 sum_of_weights +=
cluster.weight;
797 &
cluster.typed_per_filter_config);
802 if (total_weight != sum_of_weights) {
804 "RouteAction weighted_cluster has incorrect total weight");
806 if (action_weighted_clusters.empty()) {
808 "RouteAction weighted_cluster has no valid clusters specified.");
817 if (plugin_name.empty()) {
819 "RouteAction cluster contains empty cluster specifier plugin name.");
824 absl::StrCat(
"RouteAction cluster contains cluster specifier plugin "
825 "name not configured: ",
828 if (
it->second.empty()) *ignore_route =
true;
829 route->action.emplace<XdsRouteConfigResource::Route::RouteAction::
830 kClusterSpecifierPluginIndex>(
835 *ignore_route =
true;
837 if (!*ignore_route) {
845 if (duration ==
nullptr) {
850 if (duration !=
nullptr) {
859 for (
size_t i = 0;
i <
size; ++
i) {
862 XdsRouteConfigResource::Route::RouteAction::HashPolicy policy;
869 hash_policy)) !=
nullptr) {
879 if (regex_rewrite !=
nullptr) {
883 if (regex_matcher ==
nullptr) {
886 "RouteAction HashPolicy contains policy specifier Header with "
887 "RegexMatchAndSubstitution but RegexMatcher pattern is "
892 policy.regex = absl::make_unique<RE2>(
896 if (!policy.regex->ok()) {
899 "RouteAction HashPolicy contains policy specifier Header with "
900 "RegexMatchAndSubstitution but RegexMatcher pattern does not "
908 }
else if ((filter_state =
910 hash_policy)) !=
nullptr) {
914 if (
key ==
"io.grpc.channel_id") {
915 policy.type = XdsRouteConfigResource::Route::RouteAction::HashPolicy::
919 "RouteAction HashPolicy contains policy specifier "
921 "key is not io.grpc.channel_id.");
926 "RouteAction HashPolicy contains unsupported policy specifier.");
956 size_t num_virtual_hosts;
959 route_config, &num_virtual_hosts);
960 for (
size_t i = 0;
i < num_virtual_hosts; ++
i) {
968 for (
size_t j = 0; j < domain_size; ++j) {
972 absl::StrCat(
"Invalid domain pattern \"", domain_pattern,
"\"."));
993 virtual_host_retry_policy;
1005 if (num_routes < 1) {
1007 "No route found in the virtual host.");
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);
1016 for (
size_t j = 0; j < num_routes; ++j) {
1019 if (
match ==
nullptr) {
1022 size_t query_parameters_size;
1024 match, &query_parameters_size));
1025 if (query_parameters_size > 0) {
1029 bool ignore_route =
false;
1031 RoutePathMatchParse(
match, &
route, &ignore_route);
1033 if (ignore_route)
continue;
1040 auto& route_action =
1041 absl::get<XdsRouteConfigResource::Route::RouteAction>(
route.action);
1044 &route_action, &ignore_route);
1046 if (ignore_route)
continue;
1053 absl::get_if<XdsRouteConfigResource::Route::RouteAction::
1054 kClusterSpecifierPluginIndex>(
1056 if (cluster_specifier_action !=
nullptr) {
1057 cluster_specifier_plugins.erase(*cluster_specifier_action);
1072 &
route.typed_per_filter_config);
1077 if (vhost.
routes.empty()) {
1082 for (
auto& unused_plugin : cluster_specifier_plugins) {
1083 rds_update->cluster_specifier_plugin_map.erase(
1096 void MaybeLogRouteConfiguration(
1118 serialized_resource.
data(), serialized_resource.
size(),
context.arena);
1119 if (resource ==
nullptr) {
1121 "Can't parse RouteConfiguration resource.");
1123 MaybeLogRouteConfiguration(
context, resource);
1128 auto route_config_data = absl::make_unique<ResourceDataSubclass>();
1130 context, resource, &route_config_data->resource);
1143 route_config_data->resource.ToString().c_str());
strings_internal::Splitter< typename strings_internal::SelectDelimiter< Delimiter >::type, AllowEmpty, absl::string_view > StrSplit(strings_internal::ConvertibleToStringView text, Delimiter d)
std::string ToString() const
Status InvalidArgumentError(absl::string_view message)
UPB_INLINE bool envoy_config_route_v3_HeaderMatcher_has_suffix_match(const envoy_config_route_v3_HeaderMatcher *msg)
struct envoy_config_route_v3_RouteMatch envoy_config_route_v3_RouteMatch
struct envoy_config_route_v3_RouteAction_HashPolicy_FilterState envoy_config_route_v3_RouteAction_HashPolicy_FilterState
strings_internal::MaxSplitsImpl< typename strings_internal::SelectDelimiter< Delimiter >::type > MaxSplits(Delimiter delimiter, int limit)
TypedPerFilterConfig typed_per_filter_config
HashPolicy & operator=(const HashPolicy &other)
const UPB_INLINE envoy_config_route_v3_RetryPolicy_RetryBackOff * envoy_config_route_v3_RetryPolicy_retry_back_off(const envoy_config_route_v3_RetryPolicy *msg)
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)
UPB_INLINE bool envoy_config_route_v3_HeaderMatcher_has_range_match(const envoy_config_route_v3_HeaderMatcher *msg)
UPB_INLINE upb_StringView envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry_key(const envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry *msg)
UPB_INLINE const struct envoy_type_matcher_v3_RegexMatcher * envoy_config_route_v3_HeaderMatcher_safe_regex_match(const envoy_config_route_v3_HeaderMatcher *msg)
UPB_INLINE const struct google_protobuf_Duration * envoy_config_route_v3_RetryPolicy_RetryBackOff_max_interval(const envoy_config_route_v3_RetryPolicy_RetryBackOff *msg)
UPB_INLINE upb_StringView envoy_config_route_v3_RouteAction_HashPolicy_FilterState_key(const envoy_config_route_v3_RouteAction_HashPolicy_FilterState *msg)
UPB_INLINE upb_StringView envoy_config_core_v3_TypedExtensionConfig_name(const envoy_config_core_v3_TypedExtensionConfig *msg)
static constexpr size_t kClusterSpecifierPluginIndex
const UPB_INLINE envoy_config_route_v3_RetryPolicy * envoy_config_route_v3_VirtualHost_retry_policy(const envoy_config_route_v3_VirtualHost *msg)
bool operator==(const BaseSlice &a, const BaseSlice &b)
@ GRPC_STATUS_UNAVAILABLE
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_config_route_v3_WeightedCluster_total_weight(const envoy_config_route_v3_WeightedCluster *msg)
UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_path(const envoy_config_route_v3_RouteMatch *msg)
std::string StrCat(const AlphaNum &a, const AlphaNum &b)
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)
absl::optional< absl::StatusOr< XdsRouteConfigResource > > rds_update
ABSL_MUST_USE_RESULT std::string StrFormat(const FormatSpec< Args... > &format, const Args &... args)
const Descriptor::ReservedRange const EnumValueDescriptor const MethodDescriptor extension
std::unique_ptr< RE2 > regex
struct envoy_config_route_v3_WeightedCluster envoy_config_route_v3_WeightedCluster
struct envoy_config_route_v3_Route envoy_config_route_v3_Route
struct envoy_config_route_v3_WeightedCluster_ClusterWeight envoy_config_route_v3_WeightedCluster_ClusterWeight
XdsRouteConfigResource::Route route
GPRAPI void GPRAPI int gpr_should_log(gpr_log_severity severity)
@ envoy_type_v3_FractionalPercent_HUNDRED
absl::StatusOr< DecodeResult > Decode(const XdsEncodingContext &context, absl::string_view serialized_resource, bool) const override
UPB_INLINE upb_StringView envoy_config_route_v3_RouteMatch_prefix(const envoy_config_route_v3_RouteMatch *msg)
unsigned char match[65280+2]
UPB_INLINE upb_StringView envoy_config_route_v3_HeaderMatcher_exact_match(const envoy_config_route_v3_HeaderMatcher *msg)
UPB_INLINE const struct envoy_config_core_v3_TypedExtensionConfig * envoy_config_route_v3_ClusterSpecifierPlugin_extension(const envoy_config_route_v3_ClusterSpecifierPlugin *msg)
GPRAPI void gpr_free(void *ptr)
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)
UPB_INLINE upb_StringView envoy_type_matcher_v3_RegexMatchAndSubstitute_substitution(const envoy_type_matcher_v3_RegexMatchAndSubstitute *msg)
const UPB_INLINE envoy_config_route_v3_RouteMatch * envoy_config_route_v3_Route_match(const envoy_config_route_v3_Route *msg)
struct envoy_config_route_v3_VirtualHost envoy_config_route_v3_VirtualHost
static absl::StatusOr< StringMatcher > Create(Type type, absl::string_view matcher, bool case_sensitive=true)
struct envoy_config_route_v3_RouteAction_MaxStreamDuration envoy_config_route_v3_RouteAction_MaxStreamDuration
@ GRPC_STATUS_DEADLINE_EXCEEDED
std::string ToString() const
struct envoy_config_core_v3_TypedExtensionConfig envoy_config_core_v3_TypedExtensionConfig
UPB_INLINE envoy_config_route_v3_FilterConfig * envoy_config_route_v3_FilterConfig_parse(const char *buf, size_t size, upb_Arena *arena)
const UPB_INLINE envoy_type_matcher_v3_RegexMatcher * envoy_type_matcher_v3_RegexMatchAndSubstitute_pattern(const envoy_type_matcher_v3_RegexMatchAndSubstitute *msg)
@ GRPC_STATUS_RESOURCE_EXHAUSTED
UPB_INLINE const struct google_protobuf_Duration * envoy_config_route_v3_RetryPolicy_RetryBackOff_base_interval(const envoy_config_route_v3_RetryPolicy_RetryBackOff *msg)
static const XdsHttpFilterImpl * GetFilterForType(absl::string_view proto_type_name)
#define GRPC_TRACE_FLAG_ENABLED(f)
std::vector< VirtualHost > virtual_hosts
struct envoy_config_route_v3_RetryPolicy envoy_config_route_v3_RetryPolicy
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)
bool gpr_parse_bool_value(const char *value, bool *dst)
#define GRPC_ERROR_CREATE_FROM_VECTOR(desc, error_list)
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)
static constexpr size_t kWeightedClustersIndex
std::string UpbStringToStdString(const upb_StringView &str)
const UPB_INLINE envoy_config_route_v3_RouteAction * envoy_config_route_v3_Route_route(const envoy_config_route_v3_Route *msg)
void retry(grpc_end2end_test_config config)
struct google_protobuf_Any google_protobuf_Any
UPB_INLINE bool envoy_config_route_v3_HeaderMatcher_has_contains_match(const envoy_config_route_v3_HeaderMatcher *msg)
UPB_INLINE upb_StringView envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_key(const envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry *msg)
std::string ToString() const
std::string ToString() const
Duration ParseDuration(const google_protobuf_Duration *proto_duration)
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)
TypedPerFilterConfig typed_per_filter_config
UPB_INLINE int32_t envoy_type_v3_FractionalPercent_denominator(const envoy_type_v3_FractionalPercent *msg)
char * gpr_getenv(const char *name)
std::string ToString() const
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
UPB_INLINE bool envoy_config_route_v3_RouteAction_has_weighted_clusters(const envoy_config_route_v3_RouteAction *msg)
UPB_INLINE const struct envoy_type_v3_FractionalPercent * envoy_config_core_v3_RuntimeFractionalPercent_default_value(const envoy_config_core_v3_RuntimeFractionalPercent *msg)
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)
std::string StrJoin(Iterator start, Iterator end, absl::string_view sep, Formatter &&fmt)
absl::string_view cluster
constexpr size_type size() const noexcept
UPB_INLINE const struct google_protobuf_Any * envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry_value(const envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry *msg)
def c_str(s, encoding='ascii')
std::map< std::string, XdsHttpFilterImpl::FilterConfig > TypedPerFilterConfig
@ envoy_type_v3_FractionalPercent_MILLION
UPB_INLINE bool envoy_config_route_v3_FilterConfig_is_optional(const envoy_config_route_v3_FilterConfig *msg)
UPB_INLINE upb_StringView const * envoy_config_route_v3_VirtualHost_domains(const envoy_config_route_v3_VirtualHost *msg, size_t *len)
UPB_INLINE int64_t envoy_type_v3_Int64Range_end(const envoy_type_v3_Int64Range *msg)
std::string StatusToString(const absl::Status &status)
UPB_INLINE const struct google_protobuf_BoolValue * envoy_config_route_v3_RouteMatch_case_sensitive(const envoy_config_route_v3_RouteMatch *msg)
static const XdsClusterSpecifierPluginImpl * GetPluginForType(absl::string_view config_proto_type_name)
struct envoy_config_route_v3_RouteConfiguration envoy_config_route_v3_RouteConfiguration
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
struct envoy_config_route_v3_RouteAction_HashPolicy envoy_config_route_v3_RouteAction_HashPolicy
std::vector< HashPolicy > hash_policies
struct envoy_config_route_v3_RouteAction envoy_config_route_v3_RouteAction
std::string ToString() const
constexpr absl::add_pointer_t< variant_alternative_t< I, variant< Types... > > > get_if(variant< Types... > *v) noexcept
struct envoy_config_core_v3_RuntimeFractionalPercent envoy_config_core_v3_RuntimeFractionalPercent
std::vector< Route > routes
struct absl::base_internal::@2940::AllocList::Header header
UPB_INLINE upb_StringView envoy_config_route_v3_RetryPolicy_retry_on(const envoy_config_route_v3_RetryPolicy *msg)
UPB_INLINE bool envoy_config_route_v3_Route_has_non_forwarding_action(const envoy_config_route_v3_Route *msg)
UPB_INLINE upb_StringView envoy_config_route_v3_RouteMatch_path(const envoy_config_route_v3_RouteMatch *msg)
UPB_INLINE bool envoy_config_route_v3_ClusterSpecifierPlugin_is_optional(const envoy_config_route_v3_ClusterSpecifierPlugin *msg)
const UPB_INLINE envoy_config_route_v3_RetryPolicy * envoy_config_route_v3_RouteAction_retry_policy(const envoy_config_route_v3_RouteAction *msg)
UPB_INLINE bool envoy_config_route_v3_HeaderMatcher_has_prefix_match(const envoy_config_route_v3_HeaderMatcher *msg)
UPB_INLINE const struct envoy_config_core_v3_RuntimeFractionalPercent * envoy_config_route_v3_RouteMatch_runtime_fraction(const envoy_config_route_v3_RouteMatch *msg)
const UPB_INLINE envoy_config_route_v3_RouteAction_MaxStreamDuration * envoy_config_route_v3_RouteAction_max_stream_duration(const envoy_config_route_v3_RouteAction *msg)
constexpr bool holds_alternative(const variant< Types... > &v) noexcept
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)
std::map< std::string, std::string > cluster_specifier_plugin_map
UPB_INLINE const struct google_protobuf_Any * envoy_config_route_v3_Route_TypedPerFilterConfigEntry_value(const envoy_config_route_v3_Route_TypedPerFilterConfigEntry *msg)
@ envoy_type_v3_FractionalPercent_TEN_THOUSAND
UPB_INLINE bool envoy_config_route_v3_RouteAction_has_cluster_specifier_plugin(const envoy_config_route_v3_RouteAction *msg)
#define GRPC_ERROR_CREATE_FROM_STATIC_STRING(desc)
std::string ToString() const
struct envoy_type_v3_FractionalPercent envoy_type_v3_FractionalPercent
UPB_INLINE bool envoy_config_route_v3_RouteAction_HashPolicy_terminal(const envoy_config_route_v3_RouteAction_HashPolicy *msg)
std::string regex_substitution
RetryBackOff retry_back_off
envoy_type_v3_FractionalPercent_DenominatorType
UPB_INLINE uint32_t google_protobuf_UInt32Value_value(const google_protobuf_UInt32Value *msg)
struct envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry
struct envoy_type_matcher_v3_RegexMatcher envoy_type_matcher_v3_RegexMatcher
UPB_INLINE const struct envoy_type_matcher_v3_RegexMatcher * envoy_config_route_v3_RouteMatch_safe_regex(const envoy_config_route_v3_RouteMatch *msg)
UPB_INLINE const struct google_protobuf_Duration * envoy_config_route_v3_RouteAction_MaxStreamDuration_max_stream_duration(const envoy_config_route_v3_RouteAction_MaxStreamDuration *msg)
UPB_INLINE bool envoy_config_route_v3_HeaderMatcher_present_match(const envoy_config_route_v3_HeaderMatcher *msg)
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)
UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_safe_regex(const envoy_config_route_v3_RouteMatch *msg)
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_config_route_v3_WeightedCluster_ClusterWeight_weight(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg)
UPB_INLINE envoy_config_route_v3_RouteConfiguration * envoy_config_route_v3_RouteConfiguration_parse(const char *buf, size_t size, upb_Arena *arena)
size_t upb_TextEncode(const upb_Message *msg, const upb_MessageDef *m, const upb_DefPool *ext_pool, int options, char *buf, size_t size)
struct envoy_type_v3_Int64Range envoy_type_v3_Int64Range
std::vector< Route > routes
static constexpr Duration Milliseconds(int64_t millis)
UPB_INLINE upb_StringView envoy_config_route_v3_Route_TypedPerFilterConfigEntry_key(const envoy_config_route_v3_Route_TypedPerFilterConfigEntry *msg)
ABSL_MUST_USE_RESULT bool ok() const
grpc_error_handle absl_status_to_grpc_error(absl::Status status)
struct envoy_config_route_v3_Route_TypedPerFilterConfigEntry envoy_config_route_v3_Route_TypedPerFilterConfigEntry
UPB_INLINE const struct google_protobuf_Any * envoy_config_route_v3_FilterConfig_config(const envoy_config_route_v3_FilterConfig *msg)
const UPB_INLINE upb_MessageDef * envoy_config_route_v3_RouteConfiguration_getmsgdef(upb_DefPool *s)
static constexpr size_t kClusterIndex
std::string grpc_error_std_string(grpc_error_handle error)
std::vector< std::string > domains
absl::optional< RetryPolicy > retry_policy
#define GRPC_ERROR_CREATE_FROM_CPP_STRING(desc)
UPB_INLINE upb_StringView envoy_config_route_v3_HeaderMatcher_suffix_match(const envoy_config_route_v3_HeaderMatcher *msg)
int codes(struct state *s, const struct huffman *lencode, const struct huffman *distcode)
UPB_INLINE upb_StringView google_protobuf_Any_type_url(const google_protobuf_Any *msg)
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)
UPB_INLINE bool envoy_config_route_v3_HeaderMatcher_has_present_match(const envoy_config_route_v3_HeaderMatcher *msg)
static const char prefix[]
UPB_INLINE bool envoy_config_route_v3_HeaderMatcher_invert_match(const envoy_config_route_v3_HeaderMatcher *msg)
std::string ToString() const
struct google_protobuf_Duration google_protobuf_Duration
UPB_INLINE const struct google_protobuf_Any * envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_value(const envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry *msg)
struct envoy_config_route_v3_ClusterSpecifierPlugin envoy_config_route_v3_ClusterSpecifierPlugin
#define GRPC_ERROR_UNREF(err)
absl::StatusOr< ExtractExtensionTypeNameResult > ExtractExtensionTypeName(const XdsEncodingContext &context, const google_protobuf_Any *any)
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)
UPB_INLINE const struct google_protobuf_Any * envoy_config_core_v3_TypedExtensionConfig_typed_config(const envoy_config_core_v3_TypedExtensionConfig *msg)
UPB_INLINE upb_StringView envoy_config_route_v3_RouteConfiguration_name(const envoy_config_route_v3_RouteConfiguration *msg)
struct envoy_config_route_v3_RouteAction_HashPolicy_Header envoy_config_route_v3_RouteAction_HashPolicy_Header
static grpc_error_handle Parse(const XdsEncodingContext &context, const envoy_config_route_v3_RouteConfiguration *route_config, XdsRouteConfigResource *rds_update)
struct envoy_config_route_v3_HeaderMatcher envoy_config_route_v3_HeaderMatcher
UPB_INLINE bool envoy_config_route_v3_HeaderMatcher_has_exact_match(const envoy_config_route_v3_HeaderMatcher *msg)
UPB_INLINE upb_StringView envoy_config_route_v3_HeaderMatcher_contains_match(const envoy_config_route_v3_HeaderMatcher *msg)
UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_prefix(const envoy_config_route_v3_RouteMatch *msg)
UPB_INLINE upb_StringView envoy_type_matcher_v3_RegexMatcher_regex(const envoy_type_matcher_v3_RegexMatcher *msg)
absl::optional< Duration > max_stream_duration
constexpr bool empty() const noexcept
UPB_INLINE upb_StringView envoy_config_route_v3_HeaderMatcher_name(const envoy_config_route_v3_HeaderMatcher *msg)
grpc::ClientContext context
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)
const T & value() const &ABSL_ATTRIBUTE_LIFETIME_BOUND
UPB_INLINE upb_StringView envoy_config_route_v3_WeightedCluster_ClusterWeight_name(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg)
UPB_INLINE upb_StringView envoy_config_route_v3_HeaderMatcher_prefix_match(const envoy_config_route_v3_HeaderMatcher *msg)
UPB_INLINE bool envoy_config_route_v3_Route_has_route(const envoy_config_route_v3_Route *msg)
struct google_protobuf_UInt32Value google_protobuf_UInt32Value
UPB_INLINE bool envoy_config_route_v3_RouteAction_has_cluster(const envoy_config_route_v3_RouteAction *msg)
UPB_INLINE int64_t envoy_type_v3_Int64Range_start(const envoy_type_v3_Int64Range *msg)
UPB_INLINE uint32_t envoy_type_v3_FractionalPercent_numerator(const envoy_type_v3_FractionalPercent *msg)
UPB_INLINE const struct envoy_type_v3_Int64Range * envoy_config_route_v3_HeaderMatcher_range_match(const envoy_config_route_v3_HeaderMatcher *msg)
absl::variant< std::string, std::vector< ClusterWeight >, std::string > action
std::vector< std::string > domains
std::string ToString() const
const UPB_INLINE envoy_config_route_v3_WeightedCluster * envoy_config_route_v3_RouteAction_weighted_clusters(const envoy_config_route_v3_RouteAction *msg)
constexpr const_pointer data() const noexcept
UPB_INLINE upb_StringView envoy_config_route_v3_RouteAction_HashPolicy_Header_header_name(const envoy_config_route_v3_RouteAction_HashPolicy_Header *msg)
absl::string_view UpbStringToAbsl(const upb_StringView &str)
UPB_INLINE upb_StringView envoy_config_route_v3_RouteAction_cluster(const envoy_config_route_v3_RouteAction *msg)
UPB_INLINE bool google_protobuf_BoolValue_value(const google_protobuf_BoolValue *msg)
static bool IsValidDomainPattern(absl::string_view domain_pattern)
UPB_INLINE const struct google_protobuf_UInt32Value * envoy_config_route_v3_RetryPolicy_num_retries(const envoy_config_route_v3_RetryPolicy *msg)
UPB_INLINE upb_StringView envoy_config_route_v3_RouteAction_cluster_specifier_plugin(const envoy_config_route_v3_RouteAction *msg)
UPB_INLINE bool envoy_config_route_v3_HeaderMatcher_has_safe_regex_match(const envoy_config_route_v3_HeaderMatcher *msg)
UPB_INLINE upb_StringView google_protobuf_Any_value(const google_protobuf_Any *msg)
const Status & status() const &
struct envoy_type_matcher_v3_RegexMatchAndSubstitute envoy_type_matcher_v3_RegexMatchAndSubstitute
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)
struct envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry
#define GRPC_ERROR_IS_NONE(err)
struct envoy_config_route_v3_RetryPolicy_RetryBackOff envoy_config_route_v3_RetryPolicy_RetryBackOff
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)
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:59