Class RouteAction.RequestMirrorPolicy.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, RouteAction.RequestMirrorPolicyOrBuilder, Cloneable
    Enclosing class:
    RouteAction.RequestMirrorPolicy

    public static final class RouteAction.RequestMirrorPolicy.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<RouteAction.RequestMirrorPolicy.Builder>
    implements RouteAction.RequestMirrorPolicyOrBuilder
     The router is capable of shadowing traffic from one cluster to another. The current
     implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to
     respond before returning the response from the primary cluster. All normal statistics are
     collected for the shadow cluster making this feature useful for testing.
     .. note::
       Shadowing will not be triggered if the primary cluster does not exist.
     
    Protobuf type envoy.extensions.filters.network.thrift_proxy.v3.RouteAction.RequestMirrorPolicy
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<RouteAction.RequestMirrorPolicy.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<RouteAction.RequestMirrorPolicy.Builder>
      • getDefaultInstanceForType

        public RouteAction.RequestMirrorPolicy getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public RouteAction.RequestMirrorPolicy build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public RouteAction.RequestMirrorPolicy buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<RouteAction.RequestMirrorPolicy.Builder>
      • getCluster

        public String getCluster()
         Specifies the cluster that requests will be mirrored to. The cluster must
         exist in the cluster manager configuration when the route configuration is loaded.
         If it disappears at runtime, the shadow request will silently be ignored.
         
        string cluster = 1 [(.validate.rules) = { ... }
        Specified by:
        getCluster in interface RouteAction.RequestMirrorPolicyOrBuilder
        Returns:
        The cluster.
      • getClusterBytes

        public com.google.protobuf.ByteString getClusterBytes()
         Specifies the cluster that requests will be mirrored to. The cluster must
         exist in the cluster manager configuration when the route configuration is loaded.
         If it disappears at runtime, the shadow request will silently be ignored.
         
        string cluster = 1 [(.validate.rules) = { ... }
        Specified by:
        getClusterBytes in interface RouteAction.RequestMirrorPolicyOrBuilder
        Returns:
        The bytes for cluster.
      • setCluster

        public RouteAction.RequestMirrorPolicy.Builder setCluster​(String value)
         Specifies the cluster that requests will be mirrored to. The cluster must
         exist in the cluster manager configuration when the route configuration is loaded.
         If it disappears at runtime, the shadow request will silently be ignored.
         
        string cluster = 1 [(.validate.rules) = { ... }
        Parameters:
        value - The cluster to set.
        Returns:
        This builder for chaining.
      • clearCluster

        public RouteAction.RequestMirrorPolicy.Builder clearCluster()
         Specifies the cluster that requests will be mirrored to. The cluster must
         exist in the cluster manager configuration when the route configuration is loaded.
         If it disappears at runtime, the shadow request will silently be ignored.
         
        string cluster = 1 [(.validate.rules) = { ... }
        Returns:
        This builder for chaining.
      • setClusterBytes

        public RouteAction.RequestMirrorPolicy.Builder setClusterBytes​(com.google.protobuf.ByteString value)
         Specifies the cluster that requests will be mirrored to. The cluster must
         exist in the cluster manager configuration when the route configuration is loaded.
         If it disappears at runtime, the shadow request will silently be ignored.
         
        string cluster = 1 [(.validate.rules) = { ... }
        Parameters:
        value - The bytes for cluster to set.
        Returns:
        This builder for chaining.
      • hasRuntimeFraction

        public boolean hasRuntimeFraction()
         If not specified, all requests to the target cluster will be mirrored.
         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 = 2;
        Specified by:
        hasRuntimeFraction in interface RouteAction.RequestMirrorPolicyOrBuilder
        Returns:
        Whether the runtimeFraction field is set.
      • getRuntimeFraction

        public RuntimeFractionalPercent getRuntimeFraction()
         If not specified, all requests to the target cluster will be mirrored.
         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 = 2;
        Specified by:
        getRuntimeFraction in interface RouteAction.RequestMirrorPolicyOrBuilder
        Returns:
        The runtimeFraction.
      • setRuntimeFraction

        public RouteAction.RequestMirrorPolicy.Builder setRuntimeFraction​(RuntimeFractionalPercent value)
         If not specified, all requests to the target cluster will be mirrored.
         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 = 2;
      • setRuntimeFraction

        public RouteAction.RequestMirrorPolicy.Builder setRuntimeFraction​(RuntimeFractionalPercent.Builder builderForValue)
         If not specified, all requests to the target cluster will be mirrored.
         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 = 2;
      • mergeRuntimeFraction

        public RouteAction.RequestMirrorPolicy.Builder mergeRuntimeFraction​(RuntimeFractionalPercent value)
         If not specified, all requests to the target cluster will be mirrored.
         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 = 2;
      • clearRuntimeFraction

        public RouteAction.RequestMirrorPolicy.Builder clearRuntimeFraction()
         If not specified, all requests to the target cluster will be mirrored.
         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 = 2;
      • getRuntimeFractionBuilder

        public RuntimeFractionalPercent.Builder getRuntimeFractionBuilder()
         If not specified, all requests to the target cluster will be mirrored.
         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 = 2;
      • getRuntimeFractionOrBuilder

        public RuntimeFractionalPercentOrBuilder getRuntimeFractionOrBuilder()
         If not specified, all requests to the target cluster will be mirrored.
         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 = 2;
        Specified by:
        getRuntimeFractionOrBuilder in interface RouteAction.RequestMirrorPolicyOrBuilder