pub struct FederationBuilder {
pub catalog: Option<Box<dyn ModelCatalogTrait>>,
pub health_checker: Option<Box<dyn HealthCheckerTrait>>,
pub router: Option<Box<dyn RouterTrait>>,
pub policies: Vec<Box<dyn RoutingPolicyTrait>>,
pub middlewares: Vec<Box<dyn GatewayMiddleware>>,
pub load_balance: LoadBalanceStrategy,
}Expand description
Builder for creating federation gateways
Fields§
§catalog: Option<Box<dyn ModelCatalogTrait>>§health_checker: Option<Box<dyn HealthCheckerTrait>>§router: Option<Box<dyn RouterTrait>>§policies: Vec<Box<dyn RoutingPolicyTrait>>§middlewares: Vec<Box<dyn GatewayMiddleware>>§load_balance: LoadBalanceStrategyImplementations§
Source§impl FederationBuilder
impl FederationBuilder
pub fn new() -> Self
pub fn with_catalog(self, catalog: impl ModelCatalogTrait + 'static) -> Self
pub fn with_health_checker( self, checker: impl HealthCheckerTrait + 'static, ) -> Self
pub fn with_router(self, router: impl RouterTrait + 'static) -> Self
pub fn with_policy(self, policy: impl RoutingPolicyTrait + 'static) -> Self
pub fn with_middleware( self, middleware: impl GatewayMiddleware + 'static, ) -> Self
pub fn with_load_balance(self, strategy: LoadBalanceStrategy) -> Self
Trait Implementations§
Source§impl Default for FederationBuilder
impl Default for FederationBuilder
Source§fn default() -> FederationBuilder
fn default() -> FederationBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FederationBuilder
impl !RefUnwindSafe for FederationBuilder
impl Send for FederationBuilder
impl Sync for FederationBuilder
impl Unpin for FederationBuilder
impl !UnwindSafe for FederationBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more