envoy_types/generated/
envoy.extensions.http.stateful_session.cookie.v3.rs

1// This file is @generated by prost-build.
2/// This extension allows the session state to be tracked via cookies.
3///
4/// This extension first encodes the address of the upstream host selected by the load balancer
5/// into a `set-cookie` response header with the :ref:`cookie configuration  <envoy_v3_api_field_extensions.http.stateful_session.cookie.v3.CookieBasedSessionState.cookie>`.
6/// when new requests are incoming, this extension will try to parse the specific upstream host
7/// address by the cookie name. If the address parsed from the cookie corresponds to a valid
8/// upstream host, this upstream host will be selected first. See :ref:`stateful session filter  <envoy_v3_api_msg_extensions.filters.http.stateful_session.v3.StatefulSession>`.
9///
10/// For example, if the cookie name is set to `sticky-host`, envoy will prefer `1.2.3.4:80`
11/// as the upstream host when the request contains the following header:
12///
13/// .. code-block:: none
14///
15/// ```text
16/// cookie: sticky-host="MS4yLjMuNDo4MA=="
17/// ```
18///
19/// When processing the upstream response, if `1.2.3.4:80` is indeed the final choice the extension
20/// does nothing. If `1.2.3.4:80` is not the final choice, the new selected host will be used to
21/// update the cookie (via the `set-cookie` response header).
22///
23/// \[\#extension: envoy.http.stateful_session.cookie\]
24#[derive(Clone, PartialEq, ::prost::Message)]
25pub struct CookieBasedSessionState {
26    /// The cookie configuration used to track session state.
27    #[prost(message, optional, tag = "1")]
28    pub cookie: ::core::option::Option<
29        super::super::super::super::super::r#type::http::v3::Cookie,
30    >,
31}
32impl ::prost::Name for CookieBasedSessionState {
33    const NAME: &'static str = "CookieBasedSessionState";
34    const PACKAGE: &'static str = "envoy.extensions.http.stateful_session.cookie.v3";
35    fn full_name() -> ::prost::alloc::string::String {
36        "envoy.extensions.http.stateful_session.cookie.v3.CookieBasedSessionState".into()
37    }
38    fn type_url() -> ::prost::alloc::string::String {
39        "type.googleapis.com/envoy.extensions.http.stateful_session.cookie.v3.CookieBasedSessionState"
40            .into()
41    }
42}