Interface RouteAction.RequestMirrorPolicyOrBuilder

All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder
All Known Implementing Classes:
RouteAction.RequestMirrorPolicy, RouteAction.RequestMirrorPolicy.Builder
Enclosing class:
RouteAction

public static interface RouteAction.RequestMirrorPolicyOrBuilder extends com.google.protobuf.MessageOrBuilder
  • Method Details

    • getCluster

      String getCluster()
       Only one of ``cluster`` and ``cluster_header`` can be specified.
       [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
       Specifies the cluster that requests will be mirrored to. The cluster must
       exist in the cluster manager configuration.
       
      string cluster = 1 [(.udpa.annotations.field_migrate) = { ... }
      Returns:
      The cluster.
    • getClusterBytes

      com.google.protobuf.ByteString getClusterBytes()
       Only one of ``cluster`` and ``cluster_header`` can be specified.
       [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}]
       Specifies the cluster that requests will be mirrored to. The cluster must
       exist in the cluster manager configuration.
       
      string cluster = 1 [(.udpa.annotations.field_migrate) = { ... }
      Returns:
      The bytes for cluster.
    • getClusterHeader

      String getClusterHeader()
       Only one of ``cluster`` and ``cluster_header`` can be specified.
       Envoy will determine the cluster to route to by reading the value of the
       HTTP header named by cluster_header from the request headers. Only the first value in header is used,
       and no shadow request will happen if the value is not found in headers. Envoy will not wait for
       the shadow cluster to respond before returning the response from the primary cluster.
      
       .. attention::
      
         Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
         ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
      
       .. note::
      
         If the header appears multiple times only the first value is used.
       
      string cluster_header = 5 [(.validate.rules) = { ... }
      Returns:
      The clusterHeader.
    • getClusterHeaderBytes

      com.google.protobuf.ByteString getClusterHeaderBytes()
       Only one of ``cluster`` and ``cluster_header`` can be specified.
       Envoy will determine the cluster to route to by reading the value of the
       HTTP header named by cluster_header from the request headers. Only the first value in header is used,
       and no shadow request will happen if the value is not found in headers. Envoy will not wait for
       the shadow cluster to respond before returning the response from the primary cluster.
      
       .. attention::
      
         Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1
         ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
      
       .. note::
      
         If the header appears multiple times only the first value is used.
       
      string cluster_header = 5 [(.validate.rules) = { ... }
      Returns:
      The bytes for clusterHeader.
    • hasRuntimeFraction

      boolean hasRuntimeFraction()
       If not specified, all requests to the target cluster will be mirrored.
      
       If specified, this field takes precedence over the ``runtime_key`` field and requests must also
       fall under the percentage of matches indicated by this field.
      
       For some fraction N/D, a random number in the range [0,D) is selected. If the
       number is <= the value of the numerator N, or if the key is not present, the default
       value, the request will be mirrored.
       
      .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
      Returns:
      Whether the runtimeFraction field is set.
    • getRuntimeFraction

      RuntimeFractionalPercent getRuntimeFraction()
       If not specified, all requests to the target cluster will be mirrored.
      
       If specified, this field takes precedence over the ``runtime_key`` field and requests must also
       fall under the percentage of matches indicated by this field.
      
       For some fraction N/D, a random number in the range [0,D) is selected. If the
       number is <= the value of the numerator N, or if the key is not present, the default
       value, the request will be mirrored.
       
      .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
      Returns:
      The runtimeFraction.
    • getRuntimeFractionOrBuilder

      RuntimeFractionalPercentOrBuilder getRuntimeFractionOrBuilder()
       If not specified, all requests to the target cluster will be mirrored.
      
       If specified, this field takes precedence over the ``runtime_key`` field and requests must also
       fall under the percentage of matches indicated by this field.
      
       For some fraction N/D, a random number in the range [0,D) is selected. If the
       number is <= the value of the numerator N, or if the key is not present, the default
       value, the request will be mirrored.
       
      .envoy.config.core.v3.RuntimeFractionalPercent runtime_fraction = 3;
    • hasTraceSampled

      boolean hasTraceSampled()
       Specifies whether the trace span for the shadow request should be sampled. If this field is not explicitly set,
       the shadow request will inherit the sampling decision of its parent span. This ensures consistency with the trace
       sampling policy of the original request and prevents oversampling, especially in scenarios where runtime sampling
       is disabled.
       
      .google.protobuf.BoolValue trace_sampled = 4;
      Returns:
      Whether the traceSampled field is set.
    • getTraceSampled

      com.google.protobuf.BoolValue getTraceSampled()
       Specifies whether the trace span for the shadow request should be sampled. If this field is not explicitly set,
       the shadow request will inherit the sampling decision of its parent span. This ensures consistency with the trace
       sampling policy of the original request and prevents oversampling, especially in scenarios where runtime sampling
       is disabled.
       
      .google.protobuf.BoolValue trace_sampled = 4;
      Returns:
      The traceSampled.
    • getTraceSampledOrBuilder

      com.google.protobuf.BoolValueOrBuilder getTraceSampledOrBuilder()
       Specifies whether the trace span for the shadow request should be sampled. If this field is not explicitly set,
       the shadow request will inherit the sampling decision of its parent span. This ensures consistency with the trace
       sampling policy of the original request and prevents oversampling, especially in scenarios where runtime sampling
       is disabled.
       
      .google.protobuf.BoolValue trace_sampled = 4;
    • getDisableShadowHostSuffixAppend

      boolean getDisableShadowHostSuffixAppend()
       Disables appending the ``-shadow`` suffix to the shadowed ``Host`` header.
      
       Defaults to ``false``.
       
      bool disable_shadow_host_suffix_append = 6;
      Returns:
      The disableShadowHostSuffixAppend.
    • getRequestHeadersMutationsList

      List<HeaderMutation> getRequestHeadersMutationsList()
       Specifies a list of header mutations that should be applied to each mirrored request.
       Header mutations are applied in the order they are specified. For more information, including
       details on header value syntax, see the documentation on :ref:`custom request headers
       <config_http_conn_man_headers_custom_request_headers>`.
       
      repeated .envoy.config.common.mutation_rules.v3.HeaderMutation request_headers_mutations = 7 [(.validate.rules) = { ... }
    • getRequestHeadersMutations

      HeaderMutation getRequestHeadersMutations(int index)
       Specifies a list of header mutations that should be applied to each mirrored request.
       Header mutations are applied in the order they are specified. For more information, including
       details on header value syntax, see the documentation on :ref:`custom request headers
       <config_http_conn_man_headers_custom_request_headers>`.
       
      repeated .envoy.config.common.mutation_rules.v3.HeaderMutation request_headers_mutations = 7 [(.validate.rules) = { ... }
    • getRequestHeadersMutationsCount

      int getRequestHeadersMutationsCount()
       Specifies a list of header mutations that should be applied to each mirrored request.
       Header mutations are applied in the order they are specified. For more information, including
       details on header value syntax, see the documentation on :ref:`custom request headers
       <config_http_conn_man_headers_custom_request_headers>`.
       
      repeated .envoy.config.common.mutation_rules.v3.HeaderMutation request_headers_mutations = 7 [(.validate.rules) = { ... }
    • getRequestHeadersMutationsOrBuilderList

      List<? extends HeaderMutationOrBuilder> getRequestHeadersMutationsOrBuilderList()
       Specifies a list of header mutations that should be applied to each mirrored request.
       Header mutations are applied in the order they are specified. For more information, including
       details on header value syntax, see the documentation on :ref:`custom request headers
       <config_http_conn_man_headers_custom_request_headers>`.
       
      repeated .envoy.config.common.mutation_rules.v3.HeaderMutation request_headers_mutations = 7 [(.validate.rules) = { ... }
    • getRequestHeadersMutationsOrBuilder

      HeaderMutationOrBuilder getRequestHeadersMutationsOrBuilder(int index)
       Specifies a list of header mutations that should be applied to each mirrored request.
       Header mutations are applied in the order they are specified. For more information, including
       details on header value syntax, see the documentation on :ref:`custom request headers
       <config_http_conn_man_headers_custom_request_headers>`.
       
      repeated .envoy.config.common.mutation_rules.v3.HeaderMutation request_headers_mutations = 7 [(.validate.rules) = { ... }
    • getHostRewriteLiteral

      String getHostRewriteLiteral()
       Indicates that during mirroring, the host header will be swapped with this value.
       :ref:`disable_shadow_host_suffix_append
       <envoy_v3_api_field_config.route.v3.RouteAction.RequestMirrorPolicy.disable_shadow_host_suffix_append>`
       is implicitly enabled if this field is set.
       
      string host_rewrite_literal = 8 [(.validate.rules) = { ... }
      Returns:
      The hostRewriteLiteral.
    • getHostRewriteLiteralBytes

      com.google.protobuf.ByteString getHostRewriteLiteralBytes()
       Indicates that during mirroring, the host header will be swapped with this value.
       :ref:`disable_shadow_host_suffix_append
       <envoy_v3_api_field_config.route.v3.RouteAction.RequestMirrorPolicy.disable_shadow_host_suffix_append>`
       is implicitly enabled if this field is set.
       
      string host_rewrite_literal = 8 [(.validate.rules) = { ... }
      Returns:
      The bytes for hostRewriteLiteral.