Interface MatcherClusterSpecifierOrBuilder

All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder
All Known Implementing Classes:
MatcherClusterSpecifier, MatcherClusterSpecifier.Builder

public interface MatcherClusterSpecifierOrBuilder extends com.google.protobuf.MessageOrBuilder
  • Method Summary

    Modifier and Type
    Method
    Description
    The matcher for cluster selection after the route has been selected.
    The matcher for cluster selection after the route has been selected.
    boolean
    The matcher for cluster selection after the route has been selected.

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    isInitialized

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • hasClusterMatcher

      boolean hasClusterMatcher()
       The matcher for cluster selection after the route has been selected. This is used when the
       route has multiple clusters (like multiple clusters for different users) and the matcher
       is used to select the cluster to use for the request.
      
       The match tree to use for grouping incoming requests into buckets.
      
       Example:
      
       .. validated-code-block:: yaml
         :type-name: xds.type.matcher.v3.Matcher
      
         matcher_list:
           matchers:
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: staging
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "staging-cluster"
      
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: prod
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "prod-cluster"
      
         # Catch-all with a default cluster.
         on_no_match:
           action:
             typed_config:
               '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
               cluster: "default-cluster"
       
      .xds.type.matcher.v3.Matcher cluster_matcher = 1 [(.validate.rules) = { ... }
      Returns:
      Whether the clusterMatcher field is set.
    • getClusterMatcher

      Matcher getClusterMatcher()
       The matcher for cluster selection after the route has been selected. This is used when the
       route has multiple clusters (like multiple clusters for different users) and the matcher
       is used to select the cluster to use for the request.
      
       The match tree to use for grouping incoming requests into buckets.
      
       Example:
      
       .. validated-code-block:: yaml
         :type-name: xds.type.matcher.v3.Matcher
      
         matcher_list:
           matchers:
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: staging
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "staging-cluster"
      
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: prod
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "prod-cluster"
      
         # Catch-all with a default cluster.
         on_no_match:
           action:
             typed_config:
               '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
               cluster: "default-cluster"
       
      .xds.type.matcher.v3.Matcher cluster_matcher = 1 [(.validate.rules) = { ... }
      Returns:
      The clusterMatcher.
    • getClusterMatcherOrBuilder

      MatcherOrBuilder getClusterMatcherOrBuilder()
       The matcher for cluster selection after the route has been selected. This is used when the
       route has multiple clusters (like multiple clusters for different users) and the matcher
       is used to select the cluster to use for the request.
      
       The match tree to use for grouping incoming requests into buckets.
      
       Example:
      
       .. validated-code-block:: yaml
         :type-name: xds.type.matcher.v3.Matcher
      
         matcher_list:
           matchers:
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: staging
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "staging-cluster"
      
           - predicate:
               single_predicate:
                 input:
                   typed_config:
                     '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput
                     header_name: env
                 value_match:
                   exact: prod
             on_match:
               action:
                 typed_config:
                   '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
                   cluster: "prod-cluster"
      
         # Catch-all with a default cluster.
         on_no_match:
           action:
             typed_config:
               '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction
               cluster: "default-cluster"
       
      .xds.type.matcher.v3.Matcher cluster_matcher = 1 [(.validate.rules) = { ... }