Class VirtualCluster.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<VirtualCluster.Builder>
-
- io.envoyproxy.envoy.config.route.v3.VirtualCluster.Builder
-
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,VirtualClusterOrBuilder,Cloneable
- Enclosing class:
- VirtualCluster
public static final class VirtualCluster.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<VirtualCluster.Builder> implements VirtualClusterOrBuilder
A virtual cluster is a way of specifying a regex matching rule against certain important endpoints such that statistics are generated explicitly for the matched requests. The reason this is useful is that when doing prefix/path matching Envoy does not always know what the application considers to be an endpoint. Thus, it’s impossible for Envoy to generically emit per endpoint statistics. However, often systems have highly critical endpoints that they wish to get “perfect” statistics on. Virtual cluster statistics are perfect in the sense that they are emitted on the downstream side such that they include network level failures. Documentation for :ref:`virtual cluster statistics <config_http_filters_router_vcluster_stats>`. .. note:: Virtual clusters are a useful tool, but we do not recommend setting up a virtual cluster for every application endpoint. This is both not easily maintainable and as well the matching and statistics output are not free.Protobuf typeenvoy.config.route.v3.VirtualCluster
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description VirtualCluster.BuilderaddAllHeaders(Iterable<? extends HeaderMatcher> values)Specifies a list of header matchers to use for matching requests.VirtualCluster.BuilderaddHeaders(int index, HeaderMatcher value)Specifies a list of header matchers to use for matching requests.VirtualCluster.BuilderaddHeaders(int index, HeaderMatcher.Builder builderForValue)Specifies a list of header matchers to use for matching requests.VirtualCluster.BuilderaddHeaders(HeaderMatcher value)Specifies a list of header matchers to use for matching requests.VirtualCluster.BuilderaddHeaders(HeaderMatcher.Builder builderForValue)Specifies a list of header matchers to use for matching requests.HeaderMatcher.BuilderaddHeadersBuilder()Specifies a list of header matchers to use for matching requests.HeaderMatcher.BuilderaddHeadersBuilder(int index)Specifies a list of header matchers to use for matching requests.VirtualCluster.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)VirtualClusterbuild()VirtualClusterbuildPartial()VirtualCluster.Builderclear()VirtualCluster.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)VirtualCluster.BuilderclearHeaders()Specifies a list of header matchers to use for matching requests.VirtualCluster.BuilderclearName()Specifies the name of the virtual cluster.VirtualCluster.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)VirtualCluster.Builderclone()VirtualClustergetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()HeaderMatchergetHeaders(int index)Specifies a list of header matchers to use for matching requests.HeaderMatcher.BuildergetHeadersBuilder(int index)Specifies a list of header matchers to use for matching requests.List<HeaderMatcher.Builder>getHeadersBuilderList()Specifies a list of header matchers to use for matching requests.intgetHeadersCount()Specifies a list of header matchers to use for matching requests.List<HeaderMatcher>getHeadersList()Specifies a list of header matchers to use for matching requests.HeaderMatcherOrBuildergetHeadersOrBuilder(int index)Specifies a list of header matchers to use for matching requests.List<? extends HeaderMatcherOrBuilder>getHeadersOrBuilderList()Specifies a list of header matchers to use for matching requests.StringgetName()Specifies the name of the virtual cluster.com.google.protobuf.ByteStringgetNameBytes()Specifies the name of the virtual cluster.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()VirtualCluster.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)VirtualCluster.BuildermergeFrom(com.google.protobuf.Message other)VirtualCluster.BuildermergeFrom(VirtualCluster other)VirtualCluster.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)VirtualCluster.BuilderremoveHeaders(int index)Specifies a list of header matchers to use for matching requests.VirtualCluster.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)VirtualCluster.BuildersetHeaders(int index, HeaderMatcher value)Specifies a list of header matchers to use for matching requests.VirtualCluster.BuildersetHeaders(int index, HeaderMatcher.Builder builderForValue)Specifies a list of header matchers to use for matching requests.VirtualCluster.BuildersetName(String value)Specifies the name of the virtual cluster.VirtualCluster.BuildersetNameBytes(com.google.protobuf.ByteString value)Specifies the name of the virtual cluster.VirtualCluster.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)VirtualCluster.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
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<VirtualCluster.Builder>
-
clear
public VirtualCluster.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<VirtualCluster.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<VirtualCluster.Builder>
-
getDefaultInstanceForType
public VirtualCluster getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public VirtualCluster build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public VirtualCluster buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public VirtualCluster.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<VirtualCluster.Builder>
-
setField
public VirtualCluster.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<VirtualCluster.Builder>
-
clearField
public VirtualCluster.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<VirtualCluster.Builder>
-
clearOneof
public VirtualCluster.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<VirtualCluster.Builder>
-
setRepeatedField
public VirtualCluster.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<VirtualCluster.Builder>
-
addRepeatedField
public VirtualCluster.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<VirtualCluster.Builder>
-
mergeFrom
public VirtualCluster.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<VirtualCluster.Builder>
-
mergeFrom
public VirtualCluster.Builder mergeFrom(VirtualCluster other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<VirtualCluster.Builder>
-
mergeFrom
public VirtualCluster.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<VirtualCluster.Builder>- Throws:
IOException
-
getHeadersList
public List<HeaderMatcher> getHeadersList()
Specifies a list of header matchers to use for matching requests. Each specified header must match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and method, respectively.
repeated .envoy.config.route.v3.HeaderMatcher headers = 4;- Specified by:
getHeadersListin interfaceVirtualClusterOrBuilder
-
getHeadersCount
public int getHeadersCount()
Specifies a list of header matchers to use for matching requests. Each specified header must match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and method, respectively.
repeated .envoy.config.route.v3.HeaderMatcher headers = 4;- Specified by:
getHeadersCountin interfaceVirtualClusterOrBuilder
-
getHeaders
public HeaderMatcher getHeaders(int index)
Specifies a list of header matchers to use for matching requests. Each specified header must match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and method, respectively.
repeated .envoy.config.route.v3.HeaderMatcher headers = 4;- Specified by:
getHeadersin interfaceVirtualClusterOrBuilder
-
setHeaders
public VirtualCluster.Builder setHeaders(int index, HeaderMatcher value)
Specifies a list of header matchers to use for matching requests. Each specified header must match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and method, respectively.
repeated .envoy.config.route.v3.HeaderMatcher headers = 4;
-
setHeaders
public VirtualCluster.Builder setHeaders(int index, HeaderMatcher.Builder builderForValue)
Specifies a list of header matchers to use for matching requests. Each specified header must match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and method, respectively.
repeated .envoy.config.route.v3.HeaderMatcher headers = 4;
-
addHeaders
public VirtualCluster.Builder addHeaders(HeaderMatcher value)
Specifies a list of header matchers to use for matching requests. Each specified header must match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and method, respectively.
repeated .envoy.config.route.v3.HeaderMatcher headers = 4;
-
addHeaders
public VirtualCluster.Builder addHeaders(int index, HeaderMatcher value)
Specifies a list of header matchers to use for matching requests. Each specified header must match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and method, respectively.
repeated .envoy.config.route.v3.HeaderMatcher headers = 4;
-
addHeaders
public VirtualCluster.Builder addHeaders(HeaderMatcher.Builder builderForValue)
Specifies a list of header matchers to use for matching requests. Each specified header must match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and method, respectively.
repeated .envoy.config.route.v3.HeaderMatcher headers = 4;
-
addHeaders
public VirtualCluster.Builder addHeaders(int index, HeaderMatcher.Builder builderForValue)
Specifies a list of header matchers to use for matching requests. Each specified header must match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and method, respectively.
repeated .envoy.config.route.v3.HeaderMatcher headers = 4;
-
addAllHeaders
public VirtualCluster.Builder addAllHeaders(Iterable<? extends HeaderMatcher> values)
Specifies a list of header matchers to use for matching requests. Each specified header must match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and method, respectively.
repeated .envoy.config.route.v3.HeaderMatcher headers = 4;
-
clearHeaders
public VirtualCluster.Builder clearHeaders()
Specifies a list of header matchers to use for matching requests. Each specified header must match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and method, respectively.
repeated .envoy.config.route.v3.HeaderMatcher headers = 4;
-
removeHeaders
public VirtualCluster.Builder removeHeaders(int index)
Specifies a list of header matchers to use for matching requests. Each specified header must match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and method, respectively.
repeated .envoy.config.route.v3.HeaderMatcher headers = 4;
-
getHeadersBuilder
public HeaderMatcher.Builder getHeadersBuilder(int index)
Specifies a list of header matchers to use for matching requests. Each specified header must match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and method, respectively.
repeated .envoy.config.route.v3.HeaderMatcher headers = 4;
-
getHeadersOrBuilder
public HeaderMatcherOrBuilder getHeadersOrBuilder(int index)
Specifies a list of header matchers to use for matching requests. Each specified header must match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and method, respectively.
repeated .envoy.config.route.v3.HeaderMatcher headers = 4;- Specified by:
getHeadersOrBuilderin interfaceVirtualClusterOrBuilder
-
getHeadersOrBuilderList
public List<? extends HeaderMatcherOrBuilder> getHeadersOrBuilderList()
Specifies a list of header matchers to use for matching requests. Each specified header must match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and method, respectively.
repeated .envoy.config.route.v3.HeaderMatcher headers = 4;- Specified by:
getHeadersOrBuilderListin interfaceVirtualClusterOrBuilder
-
addHeadersBuilder
public HeaderMatcher.Builder addHeadersBuilder()
Specifies a list of header matchers to use for matching requests. Each specified header must match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and method, respectively.
repeated .envoy.config.route.v3.HeaderMatcher headers = 4;
-
addHeadersBuilder
public HeaderMatcher.Builder addHeadersBuilder(int index)
Specifies a list of header matchers to use for matching requests. Each specified header must match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and method, respectively.
repeated .envoy.config.route.v3.HeaderMatcher headers = 4;
-
getHeadersBuilderList
public List<HeaderMatcher.Builder> getHeadersBuilderList()
Specifies a list of header matchers to use for matching requests. Each specified header must match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and method, respectively.
repeated .envoy.config.route.v3.HeaderMatcher headers = 4;
-
getName
public String getName()
Specifies the name of the virtual cluster. The virtual cluster name as well as the virtual host name are used when emitting statistics. The statistics are emitted by the router filter and are documented :ref:`here <config_http_filters_router_stats>`.
string name = 2 [(.validate.rules) = { ... }- Specified by:
getNamein interfaceVirtualClusterOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()
Specifies the name of the virtual cluster. The virtual cluster name as well as the virtual host name are used when emitting statistics. The statistics are emitted by the router filter and are documented :ref:`here <config_http_filters_router_stats>`.
string name = 2 [(.validate.rules) = { ... }- Specified by:
getNameBytesin interfaceVirtualClusterOrBuilder- Returns:
- The bytes for name.
-
setName
public VirtualCluster.Builder setName(String value)
Specifies the name of the virtual cluster. The virtual cluster name as well as the virtual host name are used when emitting statistics. The statistics are emitted by the router filter and are documented :ref:`here <config_http_filters_router_stats>`.
string name = 2 [(.validate.rules) = { ... }- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
public VirtualCluster.Builder clearName()
Specifies the name of the virtual cluster. The virtual cluster name as well as the virtual host name are used when emitting statistics. The statistics are emitted by the router filter and are documented :ref:`here <config_http_filters_router_stats>`.
string name = 2 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
setNameBytes
public VirtualCluster.Builder setNameBytes(com.google.protobuf.ByteString value)
Specifies the name of the virtual cluster. The virtual cluster name as well as the virtual host name are used when emitting statistics. The statistics are emitted by the router filter and are documented :ref:`here <config_http_filters_router_stats>`.
string name = 2 [(.validate.rules) = { ... }- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final VirtualCluster.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<VirtualCluster.Builder>
-
mergeUnknownFields
public final VirtualCluster.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<VirtualCluster.Builder>
-
-