You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
95 lines
3.7 KiB
95 lines
3.7 KiB
syntax = "proto3"; |
|
|
|
package envoy.extensions.upstreams.http.v3; |
|
|
|
import "envoy/config/core/v3/protocol.proto"; |
|
|
|
import "udpa/annotations/status.proto"; |
|
|
|
option java_package = "io.envoyproxy.envoy.extensions.upstreams.http.v3"; |
|
option java_outer_classname = "HttpProtocolOptionsProto"; |
|
option java_multiple_files = true; |
|
option (udpa.annotations.file_status).package_version_status = ACTIVE; |
|
|
|
// [#protodoc-title: HTTP Protocol Options] |
|
// [#extension: envoy.upstreams.http.http_protocol_options] |
|
|
|
// HttpProtocolOptions specifies Http upstream protocol options. This object |
|
// is used in |
|
// :ref:`typed_extension_protocol_options<envoy_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] |
|
message HttpProtocolOptions { |
|
// If this is used, the cluster will only operate on one of the possible upstream protocols (HTTP/1.1, HTTP/2). |
|
// If :ref:`http2_protocol_options <envoy_api_field_config.cluster.v3.Cluster.http2_protocol_options>` are |
|
// present, HTTP2 will be used, otherwise HTTP1.1 will be used. |
|
message ExplicitHttpConfig { |
|
oneof protocol_config { |
|
config.core.v3.Http1ProtocolOptions http_protocol_options = 1; |
|
|
|
config.core.v3.Http2ProtocolOptions http2_protocol_options = 2; |
|
} |
|
} |
|
|
|
// If this is used, the cluster can use either of the configured protocols, and |
|
// will use whichever protocol was used by the downstream connection. |
|
message UseDownstreamHttpConfig { |
|
config.core.v3.Http1ProtocolOptions http_protocol_options = 1; |
|
|
|
config.core.v3.Http2ProtocolOptions http2_protocol_options = 2; |
|
} |
|
|
|
// This contains options common across HTTP/1 and HTTP/2 |
|
config.core.v3.HttpProtocolOptions common_http_protocol_options = 1; |
|
|
|
// This contains common protocol options which are only applied upstream. |
|
config.core.v3.UpstreamHttpProtocolOptions upstream_http_protocol_options = 2; |
|
|
|
// This controls the actual protocol to be used upstream. |
|
// If none of the *upstream_protocol_options* are chosen, the default is *explicit_http_config*. |
|
oneof upstream_protocol_options { |
|
// 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. |
|
ExplicitHttpConfig explicit_http_config = 3; |
|
|
|
// This allows switching on protocol based on what protocol the downstream |
|
// connection used. |
|
UseDownstreamHttpConfig use_downstream_protocol_config = 4; |
|
} |
|
}
|
|
|