feat: initial implementation of sticky cookie for session persistance when load-balancing

This commit is contained in:
Jun Kurihara 2023-06-09 02:18:01 +09:00
commit a0ae3578d7
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
11 changed files with 580 additions and 49 deletions

View file

@ -1,7 +1,14 @@
mod load_balance;
mod load_balance_sticky_cookie;
mod upstream;
mod upstream_opts;
pub use self::{
load_balance::LoadBalance,
load_balance_sticky_cookie::{LbContext, StickyCookie, StickyCookieBuilder, StickyCookieValue},
upstream::{ReverseProxy, Upstream, UpstreamGroup, UpstreamGroupBuilder},
upstream_opts::UpstreamOption,
};
use crate::{
log::*,
utils::{BytesName, PathNameBytesExp, ServerNameBytesExp},
@ -21,8 +28,6 @@ use tokio_rustls::rustls::{
sign::{any_supported_type, CertifiedKey},
Certificate, PrivateKey, ServerConfig,
};
pub use upstream::{ReverseProxy, Upstream, UpstreamGroup, UpstreamGroupBuilder};
pub use upstream_opts::UpstreamOption;
use x509_parser::prelude::*;
/// Struct serving information to route incoming connections, like server name to be handled and tls certs/keys settings.