wip: implementing message handler, finished to implement request manipulation
This commit is contained in:
parent
a9ce26ae76
commit
c4cf40be4e
13 changed files with 834 additions and 182 deletions
|
|
@ -12,6 +12,8 @@ pub use load_balance_main::{
|
|||
};
|
||||
#[cfg(feature = "sticky-cookie")]
|
||||
pub use load_balance_sticky::LoadBalanceStickyBuilder;
|
||||
#[cfg(feature = "sticky-cookie")]
|
||||
pub use sticky_cookie::{StickyCookie, StickyCookieValue};
|
||||
|
||||
/// Result type for load balancing
|
||||
type LoadBalanceResult<T> = std::result::Result<T, LoadBalanceError>;
|
||||
|
|
|
|||
|
|
@ -3,12 +3,11 @@ mod load_balance;
|
|||
mod upstream;
|
||||
mod upstream_opts;
|
||||
|
||||
pub use backend_main::{BackendAppBuilderError, BackendAppManager};
|
||||
pub use upstream::Upstream;
|
||||
// #[cfg(feature = "sticky-cookie")]
|
||||
// pub use sticky_cookie::{StickyCookie, StickyCookieValue};
|
||||
// pub use self::{
|
||||
// load_balance::{LbContext, LoadBalance},
|
||||
// upstream::{ReverseProxy, Upstream, UpstreamGroup, UpstreamGroupBuilder},
|
||||
// upstream_opts::UpstreamOption,
|
||||
// };
|
||||
// pub use self::load_balance::{StickyCookie, StickyCookieValue};
|
||||
pub(crate) use self::{
|
||||
load_balance::{LoadBalance, LoadBalanceContext, StickyCookie, StickyCookieValue},
|
||||
upstream::{PathManager, Upstream, UpstreamCandidates},
|
||||
upstream_opts::UpstreamOption,
|
||||
};
|
||||
pub(crate) use backend_main::{BackendAppBuilderError, BackendAppManager};
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use crate::error::*;
|
|||
|
||||
#[derive(Debug, Clone, Hash, Eq, PartialEq)]
|
||||
pub enum UpstreamOption {
|
||||
OverrideHost,
|
||||
DisableOverrideHost,
|
||||
UpgradeInsecureRequests,
|
||||
ForceHttp11Upstream,
|
||||
ForceHttp2Upstream,
|
||||
|
|
@ -12,7 +12,7 @@ impl TryFrom<&str> for UpstreamOption {
|
|||
type Error = RpxyError;
|
||||
fn try_from(val: &str) -> RpxyResult<Self> {
|
||||
match val {
|
||||
"override_host" => Ok(Self::OverrideHost),
|
||||
"diaable_override_host" => Ok(Self::DisableOverrideHost),
|
||||
"upgrade_insecure_requests" => Ok(Self::UpgradeInsecureRequests),
|
||||
"force_http11_upstream" => Ok(Self::ForceHttp11Upstream),
|
||||
"force_http2_upstream" => Ok(Self::ForceHttp2Upstream),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue