Class VirtualCluster.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<VirtualCluster.Builder>
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, 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 type
envoy.config.route.v3.VirtualCluster-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate List<HeaderMatcher> private com.google.protobuf.RepeatedFieldBuilder<HeaderMatcher, HeaderMatcher.Builder, HeaderMatcherOrBuilder> private Object -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllHeaders(Iterable<? extends HeaderMatcher> values) Specifies a list of header matchers to use for matching requests.addHeaders(int index, HeaderMatcher value) Specifies a list of header matchers to use for matching requests.addHeaders(int index, HeaderMatcher.Builder builderForValue) Specifies a list of header matchers to use for matching requests.addHeaders(HeaderMatcher value) Specifies a list of header matchers to use for matching requests.addHeaders(HeaderMatcher.Builder builderForValue) Specifies a list of header matchers to use for matching requests.Specifies a list of header matchers to use for matching requests.addHeadersBuilder(int index) Specifies a list of header matchers to use for matching requests.build()private voidbuildPartial0(VirtualCluster result) private voidclear()Specifies a list of header matchers to use for matching requests.Specifies the name of the virtual cluster.private voidstatic final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetHeaders(int index) Specifies a list of header matchers to use for matching requests.getHeadersBuilder(int index) Specifies a list of header matchers to use for matching requests.Specifies a list of header matchers to use for matching requests.intSpecifies a list of header matchers to use for matching requests.Specifies a list of header matchers to use for matching requests.getHeadersOrBuilder(int index) Specifies a list of header matchers to use for matching requests.List<? extends HeaderMatcherOrBuilder> Specifies a list of header matchers to use for matching requests.getName()Specifies the name of the virtual cluster.com.google.protobuf.ByteStringSpecifies the name of the virtual cluster.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprivate com.google.protobuf.RepeatedFieldBuilder<HeaderMatcher, HeaderMatcher.Builder, HeaderMatcherOrBuilder> final booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(VirtualCluster other) removeHeaders(int index) Specifies a list of header matchers to use for matching requests.setHeaders(int index, HeaderMatcher value) Specifies a list of header matchers to use for matching requests.setHeaders(int index, HeaderMatcher.Builder builderForValue) Specifies a list of header matchers to use for matching requests.Specifies the name of the virtual cluster.setNameBytes(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, 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 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
-
Field Details
-
bitField0_
private int bitField0_ -
headers_
-
headersBuilder_
private com.google.protobuf.RepeatedFieldBuilder<HeaderMatcher, HeaderMatcher.Builder, HeaderMatcherOrBuilder> headersBuilder_ -
name_
-
-
Constructor Details
-
Builder
private Builder() -
Builder
private Builder(com.google.protobuf.AbstractMessage.BuilderParent parent)
-
-
Method Details
-
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
- 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
- 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
-
buildPartialRepeatedFields
-
buildPartial0
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<VirtualCluster.Builder>
-
mergeFrom
-
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 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
-
ensureHeadersIsMutable
private void ensureHeadersIsMutable() -
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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; -
internalGetHeadersFieldBuilder
private com.google.protobuf.RepeatedFieldBuilder<HeaderMatcher, HeaderMatcher.Builder, HeaderMatcherOrBuilder> internalGetHeadersFieldBuilder() -
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
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
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
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.
-