pub struct FederationManager { /* private fields */ }Expand description
Federation manager for multi-region coordination
Implementations§
Source§impl FederationManager
impl FederationManager
Sourcepub fn register_region(&self, config: RegionConfig)
pub fn register_region(&self, config: RegionConfig)
Register a region
Sourcepub fn unregister_region(&self, name: &str)
pub fn unregister_region(&self, name: &str)
Unregister a region
Sourcepub fn regions(&self) -> Vec<RegionConfig>
pub fn regions(&self) -> Vec<RegionConfig>
Get all regions
Sourcepub fn healthy_regions(&self) -> Vec<RegionConfig>
pub fn healthy_regions(&self) -> Vec<RegionConfig>
Get healthy regions
Sourcepub fn get_region(&self, name: &str) -> Option<RegionConfig>
pub fn get_region(&self, name: &str) -> Option<RegionConfig>
Get region by name
Sourcepub fn get_health(&self, name: &str) -> Option<RegionHealth>
pub fn get_health(&self, name: &str) -> Option<RegionHealth>
Get region health
Sourcepub fn update_health(&self, health: RegionHealth)
pub fn update_health(&self, health: RegionHealth)
Update region health
Sourcepub fn find_best_region(
&self,
requirements: &PlacementRequirements,
) -> Option<String>
pub fn find_best_region( &self, requirements: &PlacementRequirements, ) -> Option<String>
Find best region for a workload
Sourcepub async fn start_health_checks(self: Arc<Self>)
pub async fn start_health_checks(self: Arc<Self>)
Start health check loop
Auto Trait Implementations§
impl Freeze for FederationManager
impl !RefUnwindSafe for FederationManager
impl Send for FederationManager
impl Sync for FederationManager
impl Unpin for FederationManager
impl !UnwindSafe for FederationManager
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