pub struct FederationApp {
pub current_tab: FederationTab,
pub catalog: Arc<ModelCatalog>,
pub health: Arc<HealthChecker>,
pub circuit_breaker: Arc<CircuitBreaker>,
pub gateway: Option<Arc<FederationGateway>>,
pub routing_history: Vec<RoutingRecord>,
pub max_history: usize,
pub policies: Vec<PolicyDisplay>,
pub should_quit: bool,
pub status_message: Option<String>,
pub selected_row: usize,
}Expand description
Federation dashboard application state
Fields§
§current_tab: FederationTabCurrent active tab
catalog: Arc<ModelCatalog>Model catalog reference
health: Arc<HealthChecker>Health checker reference
circuit_breaker: Arc<CircuitBreaker>Circuit breaker reference
gateway: Option<Arc<FederationGateway>>Gateway reference (optional)
routing_history: Vec<RoutingRecord>Recent routing decisions
max_history: usizeMaximum routing history entries
policies: Vec<PolicyDisplay>Active policies
should_quit: boolShould quit flag
status_message: Option<String>Status message
selected_row: usizeSelected row index (for navigation)
Implementations§
Source§impl FederationApp
impl FederationApp
Sourcepub fn new(
catalog: Arc<ModelCatalog>,
health: Arc<HealthChecker>,
circuit_breaker: Arc<CircuitBreaker>,
) -> Self
pub fn new( catalog: Arc<ModelCatalog>, health: Arc<HealthChecker>, circuit_breaker: Arc<CircuitBreaker>, ) -> Self
Create new federation dashboard app
Sourcepub fn with_gateway(self, gateway: Arc<FederationGateway>) -> Self
pub fn with_gateway(self, gateway: Arc<FederationGateway>) -> Self
Attach a gateway for stats
Sourcepub fn select_next(&mut self)
pub fn select_next(&mut self)
Select next row
Sourcepub fn select_prev(&mut self)
pub fn select_prev(&mut self)
Select previous row
Sourcepub fn record_routing(&mut self, record: RoutingRecord)
pub fn record_routing(&mut self, record: RoutingRecord)
Record a routing decision
Sourcepub fn healthy_node_count(&self) -> usize
pub fn healthy_node_count(&self) -> usize
Get healthy node count
Sourcepub fn total_node_count(&self) -> usize
pub fn total_node_count(&self) -> usize
Get total node count
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
Get success rate
Sourcepub fn requests_per_sec(&self) -> f64
pub fn requests_per_sec(&self) -> f64
Get requests per second (mock for now)
Auto Trait Implementations§
impl Freeze for FederationApp
impl !RefUnwindSafe for FederationApp
impl Send for FederationApp
impl Sync for FederationApp
impl Unpin for FederationApp
impl !UnwindSafe for FederationApp
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> 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