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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// This file is @generated by prost-build.
/// The extension allows the session state is tracked via existing session context that initialized
/// by the upstream server. It assumes that the upstream server will generate the session context
/// (like session id header or cookie) in the initial response of the session and the client will use
/// the same session context in the subsequent requests without any modification.
///
/// When processing the response from the upstream, Envoy will check if the response contains the
/// session context. If the response contains the session context, no matter if it's a new session
/// context or an existing one, Envoy will join it and the upstream host as new session context.
///
/// When processing the request from the downstream, Envoy will check if the request contains the
/// session context. If the request contains the session context, Envoy will strip the
/// upstream host from the session context.
///
/// \[\#extension: envoy.http.stateful_session.envelope\]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EnvelopeSessionState {
/// Set the header config to track the session state.
#[prost(message, optional, tag = "1")]
pub header: ::core::option::Option<envelope_session_state::Header>,
}
/// Nested message and enum types in `EnvelopeSessionState`.
pub mod envelope_session_state {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Header {
/// Iff the header specified by the `name` field is present in the response (assume the `name`
/// is set to `session-header` and original header value is `xxxxxx`), then the upstream host
/// address and value of `name` field specified header will be encoded in following format and
/// the output will be used to update the `name` field specified header in the response:
///
/// .. code-block:: none
///
/// session-header: "MS4yLjMuNDo4MAo=;UV:eHh4eHh4Cg==" # base64(1.2.3.4:80);UV:base64(xxxxxx)
///
/// The `UV` (upstream value) part is used to store the original upstream header value of
/// `name` field specified header.
///
/// If this mode is used then Envoy will assume that the header in the request will also be in the
/// same format and will contain the `UV` part. This extension will parse the upstream host
/// address and update the `name` field specified header in the request to the `UV` part.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
impl ::prost::Name for Header {
const NAME: &'static str = "Header";
const PACKAGE: &'static str = "envoy.extensions.http.stateful_session.envelope.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.extensions.http.stateful_session.envelope.v3.EnvelopeSessionState.Header"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.extensions.http.stateful_session.envelope.v3.EnvelopeSessionState.Header"
.into()
}
}
}
impl ::prost::Name for EnvelopeSessionState {
const NAME: &'static str = "EnvelopeSessionState";
const PACKAGE: &'static str = "envoy.extensions.http.stateful_session.envelope.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.extensions.http.stateful_session.envelope.v3.EnvelopeSessionState".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.extensions.http.stateful_session.envelope.v3.EnvelopeSessionState"
.into()
}
}