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