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 int
bitField0_
private java.util.List<HeaderMatcher>
headers_
private com.google.protobuf.RepeatedFieldBuilder<HeaderMatcher,HeaderMatcher.Builder,HeaderMatcherOrBuilder>
headersBuilder_
private java.lang.Object
name_
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description VirtualCluster.Builder
addAllHeaders(java.lang.Iterable<? extends HeaderMatcher> values)
Specifies a list of header matchers to use for matching requests.VirtualCluster.Builder
addHeaders(int index, HeaderMatcher value)
Specifies a list of header matchers to use for matching requests.VirtualCluster.Builder
addHeaders(int index, HeaderMatcher.Builder builderForValue)
Specifies a list of header matchers to use for matching requests.VirtualCluster.Builder
addHeaders(HeaderMatcher value)
Specifies a list of header matchers to use for matching requests.VirtualCluster.Builder
addHeaders(HeaderMatcher.Builder builderForValue)
Specifies a list of header matchers to use for matching requests.HeaderMatcher.Builder
addHeadersBuilder()
Specifies a list of header matchers to use for matching requests.HeaderMatcher.Builder
addHeadersBuilder(int index)
Specifies a list of header matchers to use for matching requests.VirtualCluster
build()
VirtualCluster
buildPartial()
private void
buildPartial0(VirtualCluster result)
private void
buildPartialRepeatedFields(VirtualCluster result)
VirtualCluster.Builder
clear()
VirtualCluster.Builder
clearHeaders()
Specifies a list of header matchers to use for matching requests.VirtualCluster.Builder
clearName()
Specifies the name of the virtual cluster.private void
ensureHeadersIsMutable()
VirtualCluster
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
HeaderMatcher
getHeaders(int index)
Specifies a list of header matchers to use for matching requests.HeaderMatcher.Builder
getHeadersBuilder(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.int
getHeadersCount()
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.HeaderMatcherOrBuilder
getHeadersOrBuilder(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.String
getName()
Specifies the name of the virtual cluster.com.google.protobuf.ByteString
getNameBytes()
Specifies the name of the virtual cluster.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
VirtualCluster.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
VirtualCluster.Builder
mergeFrom(com.google.protobuf.Message other)
VirtualCluster.Builder
mergeFrom(VirtualCluster other)
VirtualCluster.Builder
removeHeaders(int index)
Specifies a list of header matchers to use for matching requests.VirtualCluster.Builder
setHeaders(int index, HeaderMatcher value)
Specifies a list of header matchers to use for matching requests.VirtualCluster.Builder
setHeaders(int index, HeaderMatcher.Builder builderForValue)
Specifies a list of header matchers to use for matching requests.VirtualCluster.Builder
setName(java.lang.String value)
Specifies the name of the virtual cluster.VirtualCluster.Builder
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
-
-
-
-
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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage.Builder<VirtualCluster.Builder>
-
clear
public 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
public VirtualCluster getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public VirtualCluster build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public VirtualCluster buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<VirtualCluster.Builder>
-
mergeFrom
public VirtualCluster.Builder mergeFrom(VirtualCluster other)
-
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 java.io.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:
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:
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
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:
getHeaders
in 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:
getHeadersOrBuilder
in 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:
getHeadersOrBuilderList
in 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:
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
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.
-
-