Class ClusterConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<ClusterConfig.Builder>
io.envoyproxy.envoy.extensions.clusters.composite.v3.ClusterConfig.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, ClusterConfigOrBuilder, Cloneable
Enclosing class:
ClusterConfig

public static final class ClusterConfig.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<ClusterConfig.Builder> implements ClusterConfigOrBuilder
 Configuration for the composite cluster. See the :ref:`architecture overview
 <arch_overview_composite_cluster>` for more information. This cluster type enables retry-aware
 cluster selection, allowing different retry attempts to automatically target
 different upstream clusters. Unlike the standard aggregate cluster which uses
 health-based selection, the composite cluster uses the retry attempt count to
 deterministically select which sub-cluster to route to.

 When retry attempts exceed the number of configured clusters, requests will fail with no
 host available.

 Example configuration:

 .. code-block:: yaml

     name: composite_cluster
     connect_timeout: 0.25s
     lb_policy: CLUSTER_PROVIDED
     cluster_type:
       name: envoy.clusters.composite
       typed_config:
         "@type": type.googleapis.com/envoy.extensions.clusters.composite.v3.ClusterConfig
         clusters:
         - name: primary_cluster
         - name: secondary_cluster
         - name: fallback_cluster

 [#extension: envoy.clusters.composite]
 
Protobuf type envoy.extensions.clusters.composite.v3.ClusterConfig
  • 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<ClusterConfig.Builder>
    • clear

      public ClusterConfig.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<ClusterConfig.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<ClusterConfig.Builder>
    • getDefaultInstanceForType

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

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

      public ClusterConfig buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public ClusterConfig.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<ClusterConfig.Builder>
    • setField

      public ClusterConfig.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<ClusterConfig.Builder>
    • clearField

      public ClusterConfig.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<ClusterConfig.Builder>
    • clearOneof

      public ClusterConfig.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<ClusterConfig.Builder>
    • setRepeatedField

      public ClusterConfig.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<ClusterConfig.Builder>
    • addRepeatedField

      public ClusterConfig.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<ClusterConfig.Builder>
    • mergeFrom

      public ClusterConfig.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<ClusterConfig.Builder>
    • mergeFrom

      public ClusterConfig.Builder mergeFrom(ClusterConfig other)
    • isInitialized

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

      public ClusterConfig.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<ClusterConfig.Builder>
      Throws:
      IOException
    • getClustersList

      public List<ClusterConfig.ClusterEntry> getClustersList()
       List of clusters to use for request routing. The first cluster is used for the
       initial request (attempt 1), the second cluster for the first retry (attempt 2),
       and so on. Must contain at least one cluster. When retry attempts exceed the number
       of configured clusters, requests will fail with no host available.
       
      repeated .envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry clusters = 1 [(.validate.rules) = { ... }
      Specified by:
      getClustersList in interface ClusterConfigOrBuilder
    • getClustersCount

      public int getClustersCount()
       List of clusters to use for request routing. The first cluster is used for the
       initial request (attempt 1), the second cluster for the first retry (attempt 2),
       and so on. Must contain at least one cluster. When retry attempts exceed the number
       of configured clusters, requests will fail with no host available.
       
      repeated .envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry clusters = 1 [(.validate.rules) = { ... }
      Specified by:
      getClustersCount in interface ClusterConfigOrBuilder
    • getClusters

      public ClusterConfig.ClusterEntry getClusters(int index)
       List of clusters to use for request routing. The first cluster is used for the
       initial request (attempt 1), the second cluster for the first retry (attempt 2),
       and so on. Must contain at least one cluster. When retry attempts exceed the number
       of configured clusters, requests will fail with no host available.
       
      repeated .envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry clusters = 1 [(.validate.rules) = { ... }
      Specified by:
      getClusters in interface ClusterConfigOrBuilder
    • setClusters

      public ClusterConfig.Builder setClusters(int index, ClusterConfig.ClusterEntry value)
       List of clusters to use for request routing. The first cluster is used for the
       initial request (attempt 1), the second cluster for the first retry (attempt 2),
       and so on. Must contain at least one cluster. When retry attempts exceed the number
       of configured clusters, requests will fail with no host available.
       
      repeated .envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry clusters = 1 [(.validate.rules) = { ... }
    • setClusters

      public ClusterConfig.Builder setClusters(int index, ClusterConfig.ClusterEntry.Builder builderForValue)
       List of clusters to use for request routing. The first cluster is used for the
       initial request (attempt 1), the second cluster for the first retry (attempt 2),
       and so on. Must contain at least one cluster. When retry attempts exceed the number
       of configured clusters, requests will fail with no host available.
       
      repeated .envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry clusters = 1 [(.validate.rules) = { ... }
    • addClusters

       List of clusters to use for request routing. The first cluster is used for the
       initial request (attempt 1), the second cluster for the first retry (attempt 2),
       and so on. Must contain at least one cluster. When retry attempts exceed the number
       of configured clusters, requests will fail with no host available.
       
      repeated .envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry clusters = 1 [(.validate.rules) = { ... }
    • addClusters

      public ClusterConfig.Builder addClusters(int index, ClusterConfig.ClusterEntry value)
       List of clusters to use for request routing. The first cluster is used for the
       initial request (attempt 1), the second cluster for the first retry (attempt 2),
       and so on. Must contain at least one cluster. When retry attempts exceed the number
       of configured clusters, requests will fail with no host available.
       
      repeated .envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry clusters = 1 [(.validate.rules) = { ... }
    • addClusters

      public ClusterConfig.Builder addClusters(ClusterConfig.ClusterEntry.Builder builderForValue)
       List of clusters to use for request routing. The first cluster is used for the
       initial request (attempt 1), the second cluster for the first retry (attempt 2),
       and so on. Must contain at least one cluster. When retry attempts exceed the number
       of configured clusters, requests will fail with no host available.
       
      repeated .envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry clusters = 1 [(.validate.rules) = { ... }
    • addClusters

      public ClusterConfig.Builder addClusters(int index, ClusterConfig.ClusterEntry.Builder builderForValue)
       List of clusters to use for request routing. The first cluster is used for the
       initial request (attempt 1), the second cluster for the first retry (attempt 2),
       and so on. Must contain at least one cluster. When retry attempts exceed the number
       of configured clusters, requests will fail with no host available.
       
      repeated .envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry clusters = 1 [(.validate.rules) = { ... }
    • addAllClusters

      public ClusterConfig.Builder addAllClusters(Iterable<? extends ClusterConfig.ClusterEntry> values)
       List of clusters to use for request routing. The first cluster is used for the
       initial request (attempt 1), the second cluster for the first retry (attempt 2),
       and so on. Must contain at least one cluster. When retry attempts exceed the number
       of configured clusters, requests will fail with no host available.
       
      repeated .envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry clusters = 1 [(.validate.rules) = { ... }
    • clearClusters

      public ClusterConfig.Builder clearClusters()
       List of clusters to use for request routing. The first cluster is used for the
       initial request (attempt 1), the second cluster for the first retry (attempt 2),
       and so on. Must contain at least one cluster. When retry attempts exceed the number
       of configured clusters, requests will fail with no host available.
       
      repeated .envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry clusters = 1 [(.validate.rules) = { ... }
    • removeClusters

      public ClusterConfig.Builder removeClusters(int index)
       List of clusters to use for request routing. The first cluster is used for the
       initial request (attempt 1), the second cluster for the first retry (attempt 2),
       and so on. Must contain at least one cluster. When retry attempts exceed the number
       of configured clusters, requests will fail with no host available.
       
      repeated .envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry clusters = 1 [(.validate.rules) = { ... }
    • getClustersBuilder

      public ClusterConfig.ClusterEntry.Builder getClustersBuilder(int index)
       List of clusters to use for request routing. The first cluster is used for the
       initial request (attempt 1), the second cluster for the first retry (attempt 2),
       and so on. Must contain at least one cluster. When retry attempts exceed the number
       of configured clusters, requests will fail with no host available.
       
      repeated .envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry clusters = 1 [(.validate.rules) = { ... }
    • getClustersOrBuilder

      public ClusterConfig.ClusterEntryOrBuilder getClustersOrBuilder(int index)
       List of clusters to use for request routing. The first cluster is used for the
       initial request (attempt 1), the second cluster for the first retry (attempt 2),
       and so on. Must contain at least one cluster. When retry attempts exceed the number
       of configured clusters, requests will fail with no host available.
       
      repeated .envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry clusters = 1 [(.validate.rules) = { ... }
      Specified by:
      getClustersOrBuilder in interface ClusterConfigOrBuilder
    • getClustersOrBuilderList

      public List<? extends ClusterConfig.ClusterEntryOrBuilder> getClustersOrBuilderList()
       List of clusters to use for request routing. The first cluster is used for the
       initial request (attempt 1), the second cluster for the first retry (attempt 2),
       and so on. Must contain at least one cluster. When retry attempts exceed the number
       of configured clusters, requests will fail with no host available.
       
      repeated .envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry clusters = 1 [(.validate.rules) = { ... }
      Specified by:
      getClustersOrBuilderList in interface ClusterConfigOrBuilder
    • addClustersBuilder

      public ClusterConfig.ClusterEntry.Builder addClustersBuilder()
       List of clusters to use for request routing. The first cluster is used for the
       initial request (attempt 1), the second cluster for the first retry (attempt 2),
       and so on. Must contain at least one cluster. When retry attempts exceed the number
       of configured clusters, requests will fail with no host available.
       
      repeated .envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry clusters = 1 [(.validate.rules) = { ... }
    • addClustersBuilder

      public ClusterConfig.ClusterEntry.Builder addClustersBuilder(int index)
       List of clusters to use for request routing. The first cluster is used for the
       initial request (attempt 1), the second cluster for the first retry (attempt 2),
       and so on. Must contain at least one cluster. When retry attempts exceed the number
       of configured clusters, requests will fail with no host available.
       
      repeated .envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry clusters = 1 [(.validate.rules) = { ... }
    • getClustersBuilderList

      public List<ClusterConfig.ClusterEntry.Builder> getClustersBuilderList()
       List of clusters to use for request routing. The first cluster is used for the
       initial request (attempt 1), the second cluster for the first retry (attempt 2),
       and so on. Must contain at least one cluster. When retry attempts exceed the number
       of configured clusters, requests will fail with no host available.
       
      repeated .envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry clusters = 1 [(.validate.rules) = { ... }
    • setUnknownFields

      public final ClusterConfig.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<ClusterConfig.Builder>
    • mergeUnknownFields

      public final ClusterConfig.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<ClusterConfig.Builder>