envoy-types 0.7.3

Collection of protobuf types and other assets to work with the Envoy Proxy through Rust gRPC services.
Documentation
// This file is @generated by prost-build.
///
/// 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: 12\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HttpProtocolOptions {
    /// This contains options common across HTTP/1 and HTTP/2
    #[prost(message, optional, tag = "1")]
    pub common_http_protocol_options: ::core::option::Option<
        super::super::super::super::config::core::v3::HttpProtocolOptions,
    >,
    /// This contains common protocol options which are only applied upstream.
    #[prost(message, optional, tag = "2")]
    pub upstream_http_protocol_options: ::core::option::Option<
        super::super::super::super::config::core::v3::UpstreamHttpProtocolOptions,
    >,
    /// Optional HTTP filters for the upstream HTTP filter chain.
    ///
    /// .. note::
    /// Upstream HTTP filters are currently in alpha.
    ///
    /// 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\]
    #[prost(message, repeated, tag = "6")]
    pub http_filters: ::prost::alloc::vec::Vec<
        super::super::super::filters::network::http_connection_manager::v3::HttpFilter,
    >,
    /// 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\]
    #[prost(message, optional, tag = "7")]
    pub header_validation_config: ::core::option::Option<
        super::super::super::super::config::core::v3::TypedExtensionConfig,
    >,
    /// Defines http specific outlier detection parameters.
    #[prost(message, optional, tag = "8")]
    pub outlier_detection: ::core::option::Option<
        http_protocol_options::OutlierDetection,
    >,
    /// Specifies a list of HTTP-level mirroring policies for requests routed to this cluster.
    /// Cluster-level policies override route-level policies when they both are configured.
    ///
    /// .. note::
    ///
    /// Mirroring will not be triggered if the :ref:`primary cluster    <envoy_v3_api_field_config.route.v3.RouteAction.cluster>` does not exist.
    #[prost(message, repeated, tag = "9")]
    pub request_mirror_policies: ::prost::alloc::vec::Vec<
        super::super::super::super::config::route::v3::route_action::RequestMirrorPolicy,
    >,
    /// Specifies a list of hash policies for consistent hashing load balancing (e.g., Ring Hash or
    /// Maglev) for requests routed to this cluster. When configured, cluster-level policies override
    /// route-level policies. When not configured, route-level policies (if any) will be used.
    ///
    /// This enables consistent routing to the same upstream host for all requests to a cluster,
    /// which is particularly useful for stateful services like caching, session management, or
    /// sticky routing requirements.
    ///
    /// .. note::
    ///
    /// Hash policies are only effective when the cluster is configured with a hash-based load
    /// balancing policy (e.g., :ref:`RING_HASH <envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbPolicy.RING_HASH>`
    /// or :ref:`MAGLEV <envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbPolicy.MAGLEV>`).
    #[prost(message, repeated, tag = "10")]
    pub hash_policy: ::prost::alloc::vec::Vec<
        super::super::super::super::config::route::v3::route_action::HashPolicy,
    >,
    /// Specifies the retry policy for requests routed to this cluster. When configured,
    /// cluster-level retry policy overrides route-level retry policy. When not configured,
    /// route-level retry policy (if any) will be used.
    ///
    /// .. note::
    ///
    /// Cluster-level retry policy will override route-level retry policy entirely. Policies are
    /// not merged.
    #[prost(message, optional, tag = "11")]
    pub retry_policy: ::core::option::Option<
        super::super::super::super::config::route::v3::RetryPolicy,
    >,
    /// This controls the actual protocol to be used upstream.
    #[prost(oneof = "http_protocol_options::UpstreamProtocolOptions", tags = "3, 4, 5")]
    pub upstream_protocol_options: ::core::option::Option<
        http_protocol_options::UpstreamProtocolOptions,
    >,
}
/// Nested message and enum types in `HttpProtocolOptions`.
pub mod http_protocol_options {
    /// 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.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ExplicitHttpConfig {
        #[prost(oneof = "explicit_http_config::ProtocolConfig", tags = "1, 2, 3")]
        pub protocol_config: ::core::option::Option<
            explicit_http_config::ProtocolConfig,
        >,
    }
    /// Nested message and enum types in `ExplicitHttpConfig`.
    pub mod explicit_http_config {
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum ProtocolConfig {
            #[prost(message, tag = "1")]
            HttpProtocolOptions(
                super::super::super::super::super::super::config::core::v3::Http1ProtocolOptions,
            ),
            #[prost(message, tag = "2")]
            Http2ProtocolOptions(
                super::super::super::super::super::super::config::core::v3::Http2ProtocolOptions,
            ),
            /// .. warning::
            /// QUIC upstream support is currently not ready for internet use.
            /// Please see :ref:`here <arch_overview_http3>` for details.
            #[prost(message, tag = "3")]
            Http3ProtocolOptions(
                super::super::super::super::super::super::config::core::v3::Http3ProtocolOptions,
            ),
        }
    }
    impl ::prost::Name for ExplicitHttpConfig {
        const NAME: &'static str = "ExplicitHttpConfig";
        const PACKAGE: &'static str = "envoy.extensions.upstreams.http.v3";
        fn full_name() -> ::prost::alloc::string::String {
            "envoy.extensions.upstreams.http.v3.HttpProtocolOptions.ExplicitHttpConfig"
                .into()
        }
        fn type_url() -> ::prost::alloc::string::String {
            "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions.ExplicitHttpConfig"
                .into()
        }
    }
    /// 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.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct UseDownstreamHttpConfig {
        #[prost(message, optional, tag = "1")]
        pub http_protocol_options: ::core::option::Option<
            super::super::super::super::super::config::core::v3::Http1ProtocolOptions,
        >,
        #[prost(message, optional, tag = "2")]
        pub http2_protocol_options: ::core::option::Option<
            super::super::super::super::super::config::core::v3::Http2ProtocolOptions,
        >,
        /// .. warning::
        /// QUIC upstream support is currently not ready for internet use.
        /// Please see :ref:`here <arch_overview_http3>` for details.
        #[prost(message, optional, tag = "3")]
        pub http3_protocol_options: ::core::option::Option<
            super::super::super::super::super::config::core::v3::Http3ProtocolOptions,
        >,
    }
    impl ::prost::Name for UseDownstreamHttpConfig {
        const NAME: &'static str = "UseDownstreamHttpConfig";
        const PACKAGE: &'static str = "envoy.extensions.upstreams.http.v3";
        fn full_name() -> ::prost::alloc::string::String {
            "envoy.extensions.upstreams.http.v3.HttpProtocolOptions.UseDownstreamHttpConfig"
                .into()
        }
        fn type_url() -> ::prost::alloc::string::String {
            "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions.UseDownstreamHttpConfig"
                .into()
        }
    }
    /// 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".
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct AutoHttpConfig {
        #[prost(message, optional, tag = "1")]
        pub http_protocol_options: ::core::option::Option<
            super::super::super::super::super::config::core::v3::Http1ProtocolOptions,
        >,
        #[prost(message, optional, tag = "2")]
        pub http2_protocol_options: ::core::option::Option<
            super::super::super::super::super::config::core::v3::Http2ProtocolOptions,
        >,
        /// 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.
        #[prost(message, optional, tag = "3")]
        pub http3_protocol_options: ::core::option::Option<
            super::super::super::super::super::config::core::v3::Http3ProtocolOptions,
        >,
        /// 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.
        #[prost(message, optional, tag = "4")]
        pub alternate_protocols_cache_options: ::core::option::Option<
            super::super::super::super::super::config::core::v3::AlternateProtocolsCacheOptions,
        >,
    }
    impl ::prost::Name for AutoHttpConfig {
        const NAME: &'static str = "AutoHttpConfig";
        const PACKAGE: &'static str = "envoy.extensions.upstreams.http.v3";
        fn full_name() -> ::prost::alloc::string::String {
            "envoy.extensions.upstreams.http.v3.HttpProtocolOptions.AutoHttpConfig"
                .into()
        }
        fn type_url() -> ::prost::alloc::string::String {
            "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions.AutoHttpConfig"
                .into()
        }
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct OutlierDetection {
        /// If specified, only responses matching the matcher will be treated by outlier detection as errors.
        /// If not specified, only 5xx codes are treated by outlier detection as errors.
        #[prost(message, optional, tag = "1")]
        pub error_matcher: ::core::option::Option<
            super::super::super::super::super::config::common::matcher::v3::MatchPredicate,
        >,
    }
    impl ::prost::Name for OutlierDetection {
        const NAME: &'static str = "OutlierDetection";
        const PACKAGE: &'static str = "envoy.extensions.upstreams.http.v3";
        fn full_name() -> ::prost::alloc::string::String {
            "envoy.extensions.upstreams.http.v3.HttpProtocolOptions.OutlierDetection"
                .into()
        }
        fn type_url() -> ::prost::alloc::string::String {
            "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions.OutlierDetection"
                .into()
        }
    }
    /// This controls the actual protocol to be used upstream.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum UpstreamProtocolOptions {
        /// To explicitly configure either HTTP/1 or HTTP/2 (but not both!) use `explicit_http_config`.
        #[prost(message, tag = "3")]
        ExplicitHttpConfig(ExplicitHttpConfig),
        /// This allows switching on protocol based on what protocol the downstream
        /// connection used.
        #[prost(message, tag = "4")]
        UseDownstreamProtocolConfig(UseDownstreamHttpConfig),
        /// This allows switching on protocol based on ALPN
        #[prost(message, tag = "5")]
        AutoConfig(AutoHttpConfig),
    }
}
impl ::prost::Name for HttpProtocolOptions {
    const NAME: &'static str = "HttpProtocolOptions";
    const PACKAGE: &'static str = "envoy.extensions.upstreams.http.v3";
    fn full_name() -> ::prost::alloc::string::String {
        "envoy.extensions.upstreams.http.v3.HttpProtocolOptions".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions"
            .into()
    }
}