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 Summary
Modifier and TypeMethodDescriptionaddAllClusters(Iterable<? extends ClusterConfig.ClusterEntry> values) List of clusters to use for request routing.addClusters(int index, ClusterConfig.ClusterEntry value) List of clusters to use for request routing.addClusters(int index, ClusterConfig.ClusterEntry.Builder builderForValue) List of clusters to use for request routing.List of clusters to use for request routing.addClusters(ClusterConfig.ClusterEntry.Builder builderForValue) List of clusters to use for request routing.List of clusters to use for request routing.addClustersBuilder(int index) List of clusters to use for request routing.addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()List of clusters to use for request routing.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) clone()getClusters(int index) List of clusters to use for request routing.getClustersBuilder(int index) List of clusters to use for request routing.List of clusters to use for request routing.intList of clusters to use for request routing.List of clusters to use for request routing.getClustersOrBuilder(int index) List of clusters to use for request routing.List<? extends ClusterConfig.ClusterEntryOrBuilder>List of clusters to use for request routing.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.Descriptorprotected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(ClusterConfig other) final ClusterConfig.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) removeClusters(int index) List of clusters to use for request routing.setClusters(int index, ClusterConfig.ClusterEntry value) List of clusters to use for request routing.setClusters(int index, ClusterConfig.ClusterEntry.Builder builderForValue) List of clusters to use for request routing.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) final ClusterConfig.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<ClusterConfig.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<ClusterConfig.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<ClusterConfig.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<ClusterConfig.Builder>
-
setField
public ClusterConfig.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ClusterConfig.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ClusterConfig.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<ClusterConfig.Builder>
-
setRepeatedField
public ClusterConfig.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ClusterConfig.Builder>
-
addRepeatedField
public ClusterConfig.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ClusterConfig.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ClusterConfig.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ClusterConfig.Builder>- Throws:
IOException
-
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:
getClustersListin interfaceClusterConfigOrBuilder
-
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:
getClustersCountin interfaceClusterConfigOrBuilder
-
getClusters
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:
getClustersin interfaceClusterConfigOrBuilder
-
setClusters
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
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.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
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
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
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
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
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:
getClustersOrBuilderin interfaceClusterConfigOrBuilder
-
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:
getClustersOrBuilderListin interfaceClusterConfigOrBuilder
-
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
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
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:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<ClusterConfig.Builder>
-
mergeUnknownFields
public final ClusterConfig.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<ClusterConfig.Builder>
-