Class HttpProtocolOptions
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- io.envoyproxy.envoy.extensions.upstreams.http.v3.HttpProtocolOptions
-
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,HttpProtocolOptionsOrBuilder,Serializable
public final class HttpProtocolOptions extends com.google.protobuf.GeneratedMessageV3 implements HttpProtocolOptionsOrBuilder
HttpProtocolOptions specifies Http upstream protocol options. This object is used in :ref:`typed_extension_protocol_options<envoy_v3_api_field_config.cluster.v3.Cluster.typed_extension_protocol_options>`, keyed by the name ``envoy.extensions.upstreams.http.v3.HttpProtocolOptions``. This controls what protocol(s) should be used for upstream and how said protocol(s) are configured. This replaces the prior pattern of explicit protocol configuration directly in the cluster. So a configuration like this, explicitly configuring the use of HTTP/2 upstream: .. code:: clusters: - name: some_service connect_timeout: 5s upstream_http_protocol_options: auto_sni: true common_http_protocol_options: idle_timeout: 1s http2_protocol_options: max_concurrent_streams: 100 .... [further cluster config] Would now look like this: .. code:: clusters: - name: some_service connect_timeout: 5s typed_extension_protocol_options: envoy.extensions.upstreams.http.v3.HttpProtocolOptions: "@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions upstream_http_protocol_options: auto_sni: true common_http_protocol_options: idle_timeout: 1s explicit_http_config: http2_protocol_options: max_concurrent_streams: 100 .... [further cluster config] [#next-free-field: 6]Protobuf typeenvoy.extensions.upstreams.http.v3.HttpProtocolOptions- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpProtocolOptions.AutoHttpConfigIf this is used, the cluster can use either HTTP/1 or HTTP/2, and will use whichever protocol is negotiated by ALPN with the upstream.static interfaceHttpProtocolOptions.AutoHttpConfigOrBuilderstatic classHttpProtocolOptions.BuilderHttpProtocolOptions specifies Http upstream protocol options.static classHttpProtocolOptions.ExplicitHttpConfigIf this is used, the cluster will only operate on one of the possible upstream protocols.static interfaceHttpProtocolOptions.ExplicitHttpConfigOrBuilderstatic classHttpProtocolOptions.UpstreamProtocolOptionsCasestatic classHttpProtocolOptions.UseDownstreamHttpConfigIf this is used, the cluster can use either of the configured protocols, and will use whichever protocol was used by the downstream connection.static interfaceHttpProtocolOptions.UseDownstreamHttpConfigOrBuilder-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intAUTO_CONFIG_FIELD_NUMBERstatic intCOMMON_HTTP_PROTOCOL_OPTIONS_FIELD_NUMBERstatic intEXPLICIT_HTTP_CONFIG_FIELD_NUMBERstatic intUPSTREAM_HTTP_PROTOCOL_OPTIONS_FIELD_NUMBERstatic intUSE_DOWNSTREAM_PROTOCOL_CONFIG_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)HttpProtocolOptions.AutoHttpConfiggetAutoConfig()This allows switching on protocol based on ALPNHttpProtocolOptions.AutoHttpConfigOrBuildergetAutoConfigOrBuilder()This allows switching on protocol based on ALPNHttpProtocolOptionsgetCommonHttpProtocolOptions()This contains options common across HTTP/1 and HTTP/2HttpProtocolOptionsOrBuildergetCommonHttpProtocolOptionsOrBuilder()This contains options common across HTTP/1 and HTTP/2static HttpProtocolOptionsgetDefaultInstance()HttpProtocolOptionsgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()HttpProtocolOptions.ExplicitHttpConfiggetExplicitHttpConfig()To explicitly configure either HTTP/1 or HTTP/2 (but not both!)HttpProtocolOptions.ExplicitHttpConfigOrBuildergetExplicitHttpConfigOrBuilder()To explicitly configure either HTTP/1 or HTTP/2 (but not both!)com.google.protobuf.Parser<HttpProtocolOptions>getParserForType()intgetSerializedSize()com.google.protobuf.UnknownFieldSetgetUnknownFields()UpstreamHttpProtocolOptionsgetUpstreamHttpProtocolOptions()This contains common protocol options which are only applied upstream.UpstreamHttpProtocolOptionsOrBuildergetUpstreamHttpProtocolOptionsOrBuilder()This contains common protocol options which are only applied upstream.HttpProtocolOptions.UpstreamProtocolOptionsCasegetUpstreamProtocolOptionsCase()HttpProtocolOptions.UseDownstreamHttpConfiggetUseDownstreamProtocolConfig()This allows switching on protocol based on what protocol the downstream connection used.HttpProtocolOptions.UseDownstreamHttpConfigOrBuildergetUseDownstreamProtocolConfigOrBuilder()This allows switching on protocol based on what protocol the downstream connection used.booleanhasAutoConfig()This allows switching on protocol based on ALPNbooleanhasCommonHttpProtocolOptions()This contains options common across HTTP/1 and HTTP/2booleanhasExplicitHttpConfig()To explicitly configure either HTTP/1 or HTTP/2 (but not both!)inthashCode()booleanhasUpstreamHttpProtocolOptions()This contains common protocol options which are only applied upstream.booleanhasUseDownstreamProtocolConfig()This allows switching on protocol based on what protocol the downstream connection used.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static HttpProtocolOptions.BuildernewBuilder()static HttpProtocolOptions.BuildernewBuilder(HttpProtocolOptions prototype)HttpProtocolOptions.BuildernewBuilderForType()protected HttpProtocolOptions.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static HttpProtocolOptionsparseDelimitedFrom(InputStream input)static HttpProtocolOptionsparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static HttpProtocolOptionsparseFrom(byte[] data)static HttpProtocolOptionsparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static HttpProtocolOptionsparseFrom(com.google.protobuf.ByteString data)static HttpProtocolOptionsparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static HttpProtocolOptionsparseFrom(com.google.protobuf.CodedInputStream input)static HttpProtocolOptionsparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static HttpProtocolOptionsparseFrom(InputStream input)static HttpProtocolOptionsparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static HttpProtocolOptionsparseFrom(ByteBuffer data)static HttpProtocolOptionsparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<HttpProtocolOptions>parser()HttpProtocolOptions.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
COMMON_HTTP_PROTOCOL_OPTIONS_FIELD_NUMBER
public static final int COMMON_HTTP_PROTOCOL_OPTIONS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
UPSTREAM_HTTP_PROTOCOL_OPTIONS_FIELD_NUMBER
public static final int UPSTREAM_HTTP_PROTOCOL_OPTIONS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
EXPLICIT_HTTP_CONFIG_FIELD_NUMBER
public static final int EXPLICIT_HTTP_CONFIG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
USE_DOWNSTREAM_PROTOCOL_CONFIG_FIELD_NUMBER
public static final int USE_DOWNSTREAM_PROTOCOL_CONFIG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
AUTO_CONFIG_FIELD_NUMBER
public static final int AUTO_CONFIG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3
-
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
-
getUpstreamProtocolOptionsCase
public HttpProtocolOptions.UpstreamProtocolOptionsCase getUpstreamProtocolOptionsCase()
- Specified by:
getUpstreamProtocolOptionsCasein interfaceHttpProtocolOptionsOrBuilder
-
hasCommonHttpProtocolOptions
public boolean hasCommonHttpProtocolOptions()
This contains options common across HTTP/1 and HTTP/2
.envoy.config.core.v3.HttpProtocolOptions common_http_protocol_options = 1;- Specified by:
hasCommonHttpProtocolOptionsin interfaceHttpProtocolOptionsOrBuilder- Returns:
- Whether the commonHttpProtocolOptions field is set.
-
getCommonHttpProtocolOptions
public HttpProtocolOptions getCommonHttpProtocolOptions()
This contains options common across HTTP/1 and HTTP/2
.envoy.config.core.v3.HttpProtocolOptions common_http_protocol_options = 1;- Specified by:
getCommonHttpProtocolOptionsin interfaceHttpProtocolOptionsOrBuilder- Returns:
- The commonHttpProtocolOptions.
-
getCommonHttpProtocolOptionsOrBuilder
public HttpProtocolOptionsOrBuilder getCommonHttpProtocolOptionsOrBuilder()
This contains options common across HTTP/1 and HTTP/2
.envoy.config.core.v3.HttpProtocolOptions common_http_protocol_options = 1;- Specified by:
getCommonHttpProtocolOptionsOrBuilderin interfaceHttpProtocolOptionsOrBuilder
-
hasUpstreamHttpProtocolOptions
public boolean hasUpstreamHttpProtocolOptions()
This contains common protocol options which are only applied upstream.
.envoy.config.core.v3.UpstreamHttpProtocolOptions upstream_http_protocol_options = 2;- Specified by:
hasUpstreamHttpProtocolOptionsin interfaceHttpProtocolOptionsOrBuilder- Returns:
- Whether the upstreamHttpProtocolOptions field is set.
-
getUpstreamHttpProtocolOptions
public UpstreamHttpProtocolOptions getUpstreamHttpProtocolOptions()
This contains common protocol options which are only applied upstream.
.envoy.config.core.v3.UpstreamHttpProtocolOptions upstream_http_protocol_options = 2;- Specified by:
getUpstreamHttpProtocolOptionsin interfaceHttpProtocolOptionsOrBuilder- Returns:
- The upstreamHttpProtocolOptions.
-
getUpstreamHttpProtocolOptionsOrBuilder
public UpstreamHttpProtocolOptionsOrBuilder getUpstreamHttpProtocolOptionsOrBuilder()
This contains common protocol options which are only applied upstream.
.envoy.config.core.v3.UpstreamHttpProtocolOptions upstream_http_protocol_options = 2;- Specified by:
getUpstreamHttpProtocolOptionsOrBuilderin interfaceHttpProtocolOptionsOrBuilder
-
hasExplicitHttpConfig
public boolean hasExplicitHttpConfig()
To explicitly configure either HTTP/1 or HTTP/2 (but not both!) use ``explicit_http_config``. If the ``explicit_http_config`` is empty, HTTP/1.1 is used.
.envoy.extensions.upstreams.http.v3.HttpProtocolOptions.ExplicitHttpConfig explicit_http_config = 3;- Specified by:
hasExplicitHttpConfigin interfaceHttpProtocolOptionsOrBuilder- Returns:
- Whether the explicitHttpConfig field is set.
-
getExplicitHttpConfig
public HttpProtocolOptions.ExplicitHttpConfig getExplicitHttpConfig()
To explicitly configure either HTTP/1 or HTTP/2 (but not both!) use ``explicit_http_config``. If the ``explicit_http_config`` is empty, HTTP/1.1 is used.
.envoy.extensions.upstreams.http.v3.HttpProtocolOptions.ExplicitHttpConfig explicit_http_config = 3;- Specified by:
getExplicitHttpConfigin interfaceHttpProtocolOptionsOrBuilder- Returns:
- The explicitHttpConfig.
-
getExplicitHttpConfigOrBuilder
public HttpProtocolOptions.ExplicitHttpConfigOrBuilder getExplicitHttpConfigOrBuilder()
To explicitly configure either HTTP/1 or HTTP/2 (but not both!) use ``explicit_http_config``. If the ``explicit_http_config`` is empty, HTTP/1.1 is used.
.envoy.extensions.upstreams.http.v3.HttpProtocolOptions.ExplicitHttpConfig explicit_http_config = 3;- Specified by:
getExplicitHttpConfigOrBuilderin interfaceHttpProtocolOptionsOrBuilder
-
hasUseDownstreamProtocolConfig
public boolean hasUseDownstreamProtocolConfig()
This allows switching on protocol based on what protocol the downstream connection used.
.envoy.extensions.upstreams.http.v3.HttpProtocolOptions.UseDownstreamHttpConfig use_downstream_protocol_config = 4;- Specified by:
hasUseDownstreamProtocolConfigin interfaceHttpProtocolOptionsOrBuilder- Returns:
- Whether the useDownstreamProtocolConfig field is set.
-
getUseDownstreamProtocolConfig
public HttpProtocolOptions.UseDownstreamHttpConfig getUseDownstreamProtocolConfig()
This allows switching on protocol based on what protocol the downstream connection used.
.envoy.extensions.upstreams.http.v3.HttpProtocolOptions.UseDownstreamHttpConfig use_downstream_protocol_config = 4;- Specified by:
getUseDownstreamProtocolConfigin interfaceHttpProtocolOptionsOrBuilder- Returns:
- The useDownstreamProtocolConfig.
-
getUseDownstreamProtocolConfigOrBuilder
public HttpProtocolOptions.UseDownstreamHttpConfigOrBuilder getUseDownstreamProtocolConfigOrBuilder()
This allows switching on protocol based on what protocol the downstream connection used.
.envoy.extensions.upstreams.http.v3.HttpProtocolOptions.UseDownstreamHttpConfig use_downstream_protocol_config = 4;- Specified by:
getUseDownstreamProtocolConfigOrBuilderin interfaceHttpProtocolOptionsOrBuilder
-
hasAutoConfig
public boolean hasAutoConfig()
This allows switching on protocol based on ALPN
.envoy.extensions.upstreams.http.v3.HttpProtocolOptions.AutoHttpConfig auto_config = 5;- Specified by:
hasAutoConfigin interfaceHttpProtocolOptionsOrBuilder- Returns:
- Whether the autoConfig field is set.
-
getAutoConfig
public HttpProtocolOptions.AutoHttpConfig getAutoConfig()
This allows switching on protocol based on ALPN
.envoy.extensions.upstreams.http.v3.HttpProtocolOptions.AutoHttpConfig auto_config = 5;- Specified by:
getAutoConfigin interfaceHttpProtocolOptionsOrBuilder- Returns:
- The autoConfig.
-
getAutoConfigOrBuilder
public HttpProtocolOptions.AutoHttpConfigOrBuilder getAutoConfigOrBuilder()
This allows switching on protocol based on ALPN
.envoy.extensions.upstreams.http.v3.HttpProtocolOptions.AutoHttpConfig auto_config = 5;- Specified by:
getAutoConfigOrBuilderin interfaceHttpProtocolOptionsOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static HttpProtocolOptions parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HttpProtocolOptions parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HttpProtocolOptions parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HttpProtocolOptions parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HttpProtocolOptions parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HttpProtocolOptions parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HttpProtocolOptions parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static HttpProtocolOptions parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static HttpProtocolOptions parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static HttpProtocolOptions parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static HttpProtocolOptions parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static HttpProtocolOptions parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public HttpProtocolOptions.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static HttpProtocolOptions.Builder newBuilder()
-
newBuilder
public static HttpProtocolOptions.Builder newBuilder(HttpProtocolOptions prototype)
-
toBuilder
public HttpProtocolOptions.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected HttpProtocolOptions.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static HttpProtocolOptions getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<HttpProtocolOptions> parser()
-
getParserForType
public com.google.protobuf.Parser<HttpProtocolOptions> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public HttpProtocolOptions getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-