Class RouteAction.RequestMirrorPolicy.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<RouteAction.RequestMirrorPolicy.Builder>
io.envoyproxy.envoy.extensions.filters.network.thrift_proxy.v3.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 Details

    • 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>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear 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

      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
    • clone

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<RouteAction.RequestMirrorPolicy.Builder>
    • setField

      public RouteAction.RequestMirrorPolicy.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<RouteAction.RequestMirrorPolicy.Builder>
    • clearField

      public RouteAction.RequestMirrorPolicy.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<RouteAction.RequestMirrorPolicy.Builder>
    • clearOneof

      public RouteAction.RequestMirrorPolicy.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<RouteAction.RequestMirrorPolicy.Builder>
    • setRepeatedField

      public RouteAction.RequestMirrorPolicy.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RouteAction.RequestMirrorPolicy.Builder>
    • addRepeatedField

      public RouteAction.RequestMirrorPolicy.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RouteAction.RequestMirrorPolicy.Builder>
    • mergeFrom

      public RouteAction.RequestMirrorPolicy.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<RouteAction.RequestMirrorPolicy.Builder>
    • mergeFrom

    • 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>
    • mergeFrom

      public RouteAction.RequestMirrorPolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<RouteAction.RequestMirrorPolicy.Builder>
      Throws:
      IOException
    • 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

       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

       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

       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

       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

       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
    • setUnknownFields

      public final RouteAction.RequestMirrorPolicy.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RouteAction.RequestMirrorPolicy.Builder>
    • mergeUnknownFields

      public final RouteAction.RequestMirrorPolicy.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RouteAction.RequestMirrorPolicy.Builder>