Class VirtualCluster.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessage.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,java.lang.Cloneable
- Enclosing class:
- VirtualCluster
public static final class VirtualCluster.Builder extends com.google.protobuf.GeneratedMessage.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
-
-
Field Summary
Fields Modifier and Type Field Description private intbitField0_private java.util.List<HeaderMatcher>headers_private com.google.protobuf.RepeatedFieldBuilder<HeaderMatcher,HeaderMatcher.Builder,HeaderMatcherOrBuilder>headersBuilder_private java.lang.Objectname_
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description VirtualCluster.BuilderaddAllHeaders(java.lang.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.VirtualClusterbuild()VirtualClusterbuildPartial()private voidbuildPartial0(VirtualCluster result)private voidbuildPartialRepeatedFields(VirtualCluster result)VirtualCluster.Builderclear()VirtualCluster.BuilderclearHeaders()Specifies a list of header matchers to use for matching requests.VirtualCluster.BuilderclearName()Specifies the name of the virtual cluster.private voidensureHeadersIsMutable()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.java.util.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.private com.google.protobuf.RepeatedFieldBuilder<HeaderMatcher,HeaderMatcher.Builder,HeaderMatcherOrBuilder>getHeadersFieldBuilder()java.util.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.java.util.List<? extends HeaderMatcherOrBuilder>getHeadersOrBuilderList()Specifies a list of header matchers to use for matching requests.java.lang.StringgetName()Specifies the name of the virtual cluster.com.google.protobuf.ByteStringgetNameBytes()Specifies the name of the virtual cluster.protected com.google.protobuf.GeneratedMessage.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.BuilderremoveHeaders(int index)Specifies a list of header matchers to use for matching requests.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(java.lang.String value)Specifies the name of the virtual cluster.VirtualCluster.BuildersetNameBytes(com.google.protobuf.ByteString value)Specifies the name of the virtual cluster.-
Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, 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
-
-
-
-
Field Detail
-
bitField0_
private int bitField0_
-
headers_
private java.util.List<HeaderMatcher> headers_
-
headersBuilder_
private com.google.protobuf.RepeatedFieldBuilder<HeaderMatcher,HeaderMatcher.Builder,HeaderMatcherOrBuilder> headersBuilder_
-
name_
private java.lang.Object name_
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.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
-
buildPartialRepeatedFields
private void buildPartialRepeatedFields(VirtualCluster result)
-
buildPartial0
private void buildPartial0(VirtualCluster result)
-
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.GeneratedMessage.Builder<VirtualCluster.Builder>
-
mergeFrom
public VirtualCluster.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.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:
java.io.IOException
-
ensureHeadersIsMutable
private void ensureHeadersIsMutable()
-
getHeadersList
public java.util.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(java.lang.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 java.util.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 java.util.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;
-
getHeadersFieldBuilder
private com.google.protobuf.RepeatedFieldBuilder<HeaderMatcher,HeaderMatcher.Builder,HeaderMatcherOrBuilder> getHeadersFieldBuilder()
-
getName
public java.lang.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(java.lang.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.
-
-