Class 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 type envoy.extensions.upstreams.http.v3.HttpProtocolOptions
    See Also:
    Serialized Form
    • 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:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • 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:
        hasCommonHttpProtocolOptions in interface HttpProtocolOptionsOrBuilder
        Returns:
        Whether the commonHttpProtocolOptions field is set.
      • 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:
        hasUpstreamHttpProtocolOptions in interface HttpProtocolOptionsOrBuilder
        Returns:
        Whether the upstreamHttpProtocolOptions field is set.
      • 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:
        hasExplicitHttpConfig in interface HttpProtocolOptionsOrBuilder
        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:
        getExplicitHttpConfig in interface HttpProtocolOptionsOrBuilder
        Returns:
        The explicitHttpConfig.
      • 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:
        hasUseDownstreamProtocolConfig in interface HttpProtocolOptionsOrBuilder
        Returns:
        Whether the useDownstreamProtocolConfig field is set.
      • hasAutoConfig

        public boolean hasAutoConfig()
         This allows switching on protocol based on ALPN
         
        .envoy.extensions.upstreams.http.v3.HttpProtocolOptions.AutoHttpConfig auto_config = 5;
        Specified by:
        hasAutoConfig in interface HttpProtocolOptionsOrBuilder
        Returns:
        Whether the autoConfig field is set.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.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​(com.google.protobuf.CodedInputStream input,
                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                             throws IOException
        Throws:
        IOException
      • newBuilderForType

        public HttpProtocolOptions.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public HttpProtocolOptions.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected HttpProtocolOptions.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<HttpProtocolOptions> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public HttpProtocolOptions getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder