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 int
private 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 void
buildPartial0
(VirtualCluster result) private void
clear()
Specifies a list of header matchers to use for matching requests.Specifies the name of the virtual cluster.private void
static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
getHeaders
(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.int
Specifies a list of header matchers to use for matching requests.private com.google.protobuf.RepeatedFieldBuilder
<HeaderMatcher, HeaderMatcher.Builder, HeaderMatcherOrBuilder> 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.ByteString
Specifies the name of the virtual cluster.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
final boolean
mergeFrom
(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, 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
Methods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods 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, headersBuilder_HeaderMatcherOrBuilder> -
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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage.Builder<VirtualCluster.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessage.Builder<VirtualCluster.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessage.Builder<VirtualCluster.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartialRepeatedFields
-
buildPartial0
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<VirtualCluster.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in 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:
getHeadersList
in 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:
getHeadersCount
in 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:
getHeaders
in 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:
getHeadersOrBuilder
in 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:
getHeadersOrBuilderList
in 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;
-
getHeadersFieldBuilder
private com.google.protobuf.RepeatedFieldBuilder<HeaderMatcher,HeaderMatcher.Builder, getHeadersFieldBuilder()HeaderMatcherOrBuilder> -
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:
getName
in 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:
getNameBytes
in 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.
-