httpv3

package
v1.34.2-20240509201452... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: unknown License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_envoy_extensions_upstreams_http_v3_http_protocol_options_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type HttpProtocolOptions

type HttpProtocolOptions struct {

	// This contains options common across HTTP/1 and HTTP/2
	CommonHttpProtocolOptions *v3.HttpProtocolOptions `` /* 140-byte string literal not displayed */
	// This contains common protocol options which are only applied upstream.
	UpstreamHttpProtocolOptions *v3.UpstreamHttpProtocolOptions `` /* 146-byte string literal not displayed */
	// This controls the actual protocol to be used upstream.
	//
	// Types that are assignable to UpstreamProtocolOptions:
	//
	//	*HttpProtocolOptions_ExplicitHttpConfig_
	//	*HttpProtocolOptions_UseDownstreamProtocolConfig
	//	*HttpProtocolOptions_AutoConfig
	UpstreamProtocolOptions isHttpProtocolOptions_UpstreamProtocolOptions `protobuf_oneof:"upstream_protocol_options"`
	// .. note::
	//
	//	Upstream HTTP filters are currently in alpha.
	//
	// Optional HTTP filters for the upstream HTTP filter chain.
	//
	// These filters will be applied for all HTTP streams which flow through this
	// cluster. Unlike downstream HTTP filters, they will *not* be applied to terminated CONNECT requests.
	//
	// If using upstream HTTP filters, please be aware that local errors sent by
	// upstream HTTP filters will not trigger retries, and local errors sent by
	// upstream HTTP filters will count as a final response if hedging is configured.
	// [#extension-category: envoy.filters.http.upstream]
	HttpFilters []*v31.HttpFilter `protobuf:"bytes,6,rep,name=http_filters,json=httpFilters,proto3" json:"http_filters,omitempty"`
	// Configuration options for Unified Header Validation (UHV).
	// UHV is an extensible mechanism for checking validity of HTTP responses.
	//
	// [#comment:TODO(yanavlasov): Make it a link to the default header validator doc when it becomes visible.]
	// Leaving this field unspecified, selects the default header validator “envoy.http.header_validators.envoy_default“.
	//
	// [#not-implemented-hide:]
	// [#extension-category: envoy.http.header_validators]
	HeaderValidationConfig *v3.TypedExtensionConfig `` /* 129-byte string literal not displayed */
	// contains filtered or unexported fields
}

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: 8]

func (*HttpProtocolOptions) Descriptor deprecated

func (*HttpProtocolOptions) Descriptor() ([]byte, []int)

Deprecated: Use HttpProtocolOptions.ProtoReflect.Descriptor instead.

func (*HttpProtocolOptions) GetAutoConfig

func (*HttpProtocolOptions) GetCommonHttpProtocolOptions

func (x *HttpProtocolOptions) GetCommonHttpProtocolOptions() *v3.HttpProtocolOptions

func (*HttpProtocolOptions) GetExplicitHttpConfig

func (x *HttpProtocolOptions) GetExplicitHttpConfig() *HttpProtocolOptions_ExplicitHttpConfig

func (*HttpProtocolOptions) GetHeaderValidationConfig

func (x *HttpProtocolOptions) GetHeaderValidationConfig() *v3.TypedExtensionConfig

func (*HttpProtocolOptions) GetHttpFilters

func (x *HttpProtocolOptions) GetHttpFilters() []*v31.HttpFilter

func (*HttpProtocolOptions) GetUpstreamHttpProtocolOptions

func (x *HttpProtocolOptions) GetUpstreamHttpProtocolOptions() *v3.UpstreamHttpProtocolOptions

func (*HttpProtocolOptions) GetUpstreamProtocolOptions

func (m *HttpProtocolOptions) GetUpstreamProtocolOptions() isHttpProtocolOptions_UpstreamProtocolOptions

func (*HttpProtocolOptions) GetUseDownstreamProtocolConfig

func (x *HttpProtocolOptions) GetUseDownstreamProtocolConfig() *HttpProtocolOptions_UseDownstreamHttpConfig

func (*HttpProtocolOptions) ProtoMessage

func (*HttpProtocolOptions) ProtoMessage()

func (*HttpProtocolOptions) ProtoReflect

func (x *HttpProtocolOptions) ProtoReflect() protoreflect.Message

func (*HttpProtocolOptions) Reset

func (x *HttpProtocolOptions) Reset()

func (*HttpProtocolOptions) String

func (x *HttpProtocolOptions) String() string

type HttpProtocolOptions_AutoConfig

type HttpProtocolOptions_AutoConfig struct {
	// This allows switching on protocol based on ALPN
	AutoConfig *HttpProtocolOptions_AutoHttpConfig `protobuf:"bytes,5,opt,name=auto_config,json=autoConfig,proto3,oneof"`
}

type HttpProtocolOptions_AutoHttpConfig

type HttpProtocolOptions_AutoHttpConfig struct {
	HttpProtocolOptions  *v3.Http1ProtocolOptions `protobuf:"bytes,1,opt,name=http_protocol_options,json=httpProtocolOptions,proto3" json:"http_protocol_options,omitempty"`
	Http2ProtocolOptions *v3.Http2ProtocolOptions `protobuf:"bytes,2,opt,name=http2_protocol_options,json=http2ProtocolOptions,proto3" json:"http2_protocol_options,omitempty"`
	// Unlike HTTP/1 and HTTP/2, HTTP/3 will not be configured unless it is
	// present, and (soon) only if there is an indication of server side
	// support.
	// See :ref:`here <arch_overview_http3_upstream>` for more information on
	// when HTTP/3 will be used, and when Envoy will fail over to TCP.
	//
	// .. warning::
	//
	//	QUIC upstream support is currently not ready for internet use.
	//	Please see :ref:`here <arch_overview_http3>` for details.
	Http3ProtocolOptions *v3.Http3ProtocolOptions `protobuf:"bytes,3,opt,name=http3_protocol_options,json=http3ProtocolOptions,proto3" json:"http3_protocol_options,omitempty"`
	// The presence of alternate protocols cache options causes the use of the
	// alternate protocols cache, which is responsible for parsing and caching
	// HTTP Alt-Svc headers. This enables the use of HTTP/3 for origins that
	// advertise supporting it.
	//
	// .. note::
	//
	//	This is required when HTTP/3 is enabled.
	AlternateProtocolsCacheOptions *v3.AlternateProtocolsCacheOptions `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

If 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. Clusters configured with “AutoHttpConfig“ will use the highest available protocol; HTTP/2 if supported, otherwise HTTP/1. If the upstream does not support ALPN, “AutoHttpConfig“ will fail over to HTTP/1. This can only be used with transport sockets which support ALPN. Using a transport socket which does not support ALPN will result in configuration failure. The transport layer may be configured with custom ALPN, but the default ALPN for the cluster (or if custom ALPN fails) will be "h2,http/1.1".

func (*HttpProtocolOptions_AutoHttpConfig) Descriptor deprecated

func (*HttpProtocolOptions_AutoHttpConfig) Descriptor() ([]byte, []int)

Deprecated: Use HttpProtocolOptions_AutoHttpConfig.ProtoReflect.Descriptor instead.

func (*HttpProtocolOptions_AutoHttpConfig) GetAlternateProtocolsCacheOptions

func (x *HttpProtocolOptions_AutoHttpConfig) GetAlternateProtocolsCacheOptions() *v3.AlternateProtocolsCacheOptions

func (*HttpProtocolOptions_AutoHttpConfig) GetHttp2ProtocolOptions

func (x *HttpProtocolOptions_AutoHttpConfig) GetHttp2ProtocolOptions() *v3.Http2ProtocolOptions

func (*HttpProtocolOptions_AutoHttpConfig) GetHttp3ProtocolOptions

func (x *HttpProtocolOptions_AutoHttpConfig) GetHttp3ProtocolOptions() *v3.Http3ProtocolOptions

func (*HttpProtocolOptions_AutoHttpConfig) GetHttpProtocolOptions

func (x *HttpProtocolOptions_AutoHttpConfig) GetHttpProtocolOptions() *v3.Http1ProtocolOptions

func (*HttpProtocolOptions_AutoHttpConfig) ProtoMessage

func (*HttpProtocolOptions_AutoHttpConfig) ProtoMessage()

func (*HttpProtocolOptions_AutoHttpConfig) ProtoReflect

func (*HttpProtocolOptions_AutoHttpConfig) Reset

func (*HttpProtocolOptions_AutoHttpConfig) String

type HttpProtocolOptions_ExplicitHttpConfig

type HttpProtocolOptions_ExplicitHttpConfig struct {

	// Types that are assignable to ProtocolConfig:
	//
	//	*HttpProtocolOptions_ExplicitHttpConfig_HttpProtocolOptions
	//	*HttpProtocolOptions_ExplicitHttpConfig_Http2ProtocolOptions
	//	*HttpProtocolOptions_ExplicitHttpConfig_Http3ProtocolOptions
	ProtocolConfig isHttpProtocolOptions_ExplicitHttpConfig_ProtocolConfig `protobuf_oneof:"protocol_config"`
	// contains filtered or unexported fields
}

If this is used, the cluster will only operate on one of the possible upstream protocols. Note that HTTP/2 or above should generally be used for upstream gRPC clusters.

func (*HttpProtocolOptions_ExplicitHttpConfig) Descriptor deprecated

func (*HttpProtocolOptions_ExplicitHttpConfig) Descriptor() ([]byte, []int)

Deprecated: Use HttpProtocolOptions_ExplicitHttpConfig.ProtoReflect.Descriptor instead.

func (*HttpProtocolOptions_ExplicitHttpConfig) GetHttp2ProtocolOptions

func (x *HttpProtocolOptions_ExplicitHttpConfig) GetHttp2ProtocolOptions() *v3.Http2ProtocolOptions

func (*HttpProtocolOptions_ExplicitHttpConfig) GetHttp3ProtocolOptions

func (x *HttpProtocolOptions_ExplicitHttpConfig) GetHttp3ProtocolOptions() *v3.Http3ProtocolOptions

func (*HttpProtocolOptions_ExplicitHttpConfig) GetHttpProtocolOptions

func (x *HttpProtocolOptions_ExplicitHttpConfig) GetHttpProtocolOptions() *v3.Http1ProtocolOptions

func (*HttpProtocolOptions_ExplicitHttpConfig) GetProtocolConfig

func (m *HttpProtocolOptions_ExplicitHttpConfig) GetProtocolConfig() isHttpProtocolOptions_ExplicitHttpConfig_ProtocolConfig

func (*HttpProtocolOptions_ExplicitHttpConfig) ProtoMessage

func (*HttpProtocolOptions_ExplicitHttpConfig) ProtoReflect

func (*HttpProtocolOptions_ExplicitHttpConfig) Reset

func (*HttpProtocolOptions_ExplicitHttpConfig) String

type HttpProtocolOptions_ExplicitHttpConfig_

type HttpProtocolOptions_ExplicitHttpConfig_ struct {
	// 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 *HttpProtocolOptions_ExplicitHttpConfig `protobuf:"bytes,3,opt,name=explicit_http_config,json=explicitHttpConfig,proto3,oneof"`
}

type HttpProtocolOptions_ExplicitHttpConfig_Http2ProtocolOptions

type HttpProtocolOptions_ExplicitHttpConfig_Http2ProtocolOptions struct {
	Http2ProtocolOptions *v3.Http2ProtocolOptions `protobuf:"bytes,2,opt,name=http2_protocol_options,json=http2ProtocolOptions,proto3,oneof"`
}

type HttpProtocolOptions_ExplicitHttpConfig_Http3ProtocolOptions

type HttpProtocolOptions_ExplicitHttpConfig_Http3ProtocolOptions struct {
	// .. warning::
	//
	//	QUIC upstream support is currently not ready for internet use.
	//	Please see :ref:`here <arch_overview_http3>` for details.
	Http3ProtocolOptions *v3.Http3ProtocolOptions `protobuf:"bytes,3,opt,name=http3_protocol_options,json=http3ProtocolOptions,proto3,oneof"`
}

type HttpProtocolOptions_ExplicitHttpConfig_HttpProtocolOptions

type HttpProtocolOptions_ExplicitHttpConfig_HttpProtocolOptions struct {
	HttpProtocolOptions *v3.Http1ProtocolOptions `protobuf:"bytes,1,opt,name=http_protocol_options,json=httpProtocolOptions,proto3,oneof"`
}

type HttpProtocolOptions_UseDownstreamHttpConfig

type HttpProtocolOptions_UseDownstreamHttpConfig struct {
	HttpProtocolOptions  *v3.Http1ProtocolOptions `protobuf:"bytes,1,opt,name=http_protocol_options,json=httpProtocolOptions,proto3" json:"http_protocol_options,omitempty"`
	Http2ProtocolOptions *v3.Http2ProtocolOptions `protobuf:"bytes,2,opt,name=http2_protocol_options,json=http2ProtocolOptions,proto3" json:"http2_protocol_options,omitempty"`
	// .. warning::
	//
	//	QUIC upstream support is currently not ready for internet use.
	//	Please see :ref:`here <arch_overview_http3>` for details.
	Http3ProtocolOptions *v3.Http3ProtocolOptions `protobuf:"bytes,3,opt,name=http3_protocol_options,json=http3ProtocolOptions,proto3" json:"http3_protocol_options,omitempty"`
	// contains filtered or unexported fields
}

If this is used, the cluster can use either of the configured protocols, and will use whichever protocol was used by the downstream connection.

If HTTP/3 is configured for downstream and not configured for upstream, HTTP/3 requests will fail over to HTTP/2.

func (*HttpProtocolOptions_UseDownstreamHttpConfig) Descriptor deprecated

Deprecated: Use HttpProtocolOptions_UseDownstreamHttpConfig.ProtoReflect.Descriptor instead.

func (*HttpProtocolOptions_UseDownstreamHttpConfig) GetHttp2ProtocolOptions

func (*HttpProtocolOptions_UseDownstreamHttpConfig) GetHttp3ProtocolOptions

func (*HttpProtocolOptions_UseDownstreamHttpConfig) GetHttpProtocolOptions

func (*HttpProtocolOptions_UseDownstreamHttpConfig) ProtoMessage

func (*HttpProtocolOptions_UseDownstreamHttpConfig) ProtoReflect

func (*HttpProtocolOptions_UseDownstreamHttpConfig) Reset

func (*HttpProtocolOptions_UseDownstreamHttpConfig) String

type HttpProtocolOptions_UseDownstreamProtocolConfig

type HttpProtocolOptions_UseDownstreamProtocolConfig struct {
	// This allows switching on protocol based on what protocol the downstream
	// connection used.
	UseDownstreamProtocolConfig *HttpProtocolOptions_UseDownstreamHttpConfig `protobuf:"bytes,4,opt,name=use_downstream_protocol_config,json=useDownstreamProtocolConfig,proto3,oneof"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL