feat: Promote rpxy-lib/sticky-cookie to top-level feature
.. and fix compile warnings when disabled
This commit is contained in:
parent
dac1c38629
commit
8e1a0e78d1
5 changed files with 13 additions and 12 deletions
|
|
@ -131,6 +131,4 @@ impl LoadBalance {
|
|||
pub struct LoadBalanceContext {
|
||||
#[cfg(feature = "sticky-cookie")]
|
||||
pub sticky_cookie: StickyCookie,
|
||||
#[cfg(not(feature = "sticky-cookie"))]
|
||||
pub sticky_cookie: (),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ mod load_balance_sticky;
|
|||
#[cfg(feature = "sticky-cookie")]
|
||||
mod sticky_cookie;
|
||||
|
||||
#[cfg(feature = "sticky-cookie")]
|
||||
use super::upstream::Upstream;
|
||||
use thiserror::Error;
|
||||
|
||||
|
|
@ -16,6 +17,7 @@ pub use load_balance_sticky::LoadBalanceStickyBuilder;
|
|||
pub use sticky_cookie::{StickyCookie, StickyCookieValue};
|
||||
|
||||
/// Result type for load balancing
|
||||
#[cfg(feature = "sticky-cookie")]
|
||||
type LoadBalanceResult<T> = std::result::Result<T, LoadBalanceError>;
|
||||
/// Describes things that can go wrong in the Load Balance
|
||||
#[derive(Debug, Error)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue