pub struct ApiState {Show 15 fields
pub network_connection_info_provider: Option<Arc<dyn NetworkConnectionInfoProvider>>,
pub agent_service: Option<Arc<dyn AgentService + Send + Sync>>,
pub analytics_service: Arc<dyn AnalyticsService + Send + Sync>,
pub connectome_service: Arc<dyn ConnectomeService + Send + Sync>,
pub genome_service: Arc<dyn GenomeService + Send + Sync>,
pub neuron_service: Arc<dyn NeuronService + Send + Sync>,
pub runtime_service: Arc<dyn RuntimeService + Send + Sync>,
pub system_service: Arc<dyn SystemService + Send + Sync>,
pub snapshot_service: Option<Arc<dyn SnapshotService + Send + Sync>>,
pub feagi_session_timestamp: i64,
pub memory_stats_cache: Option<MemoryStatsCache>,
pub amalgamation_state: SharedAmalgamationState,
pub genome_transition_lock: Arc<Mutex<()>>,
pub genome_transition_in_progress: Arc<AtomicBool>,
pub agent_handler: Option<Arc<Mutex<FeagiAgentHandler>>>,
}Expand description
Application state shared across all HTTP handlers
Fields§
§network_connection_info_provider: Option<Arc<dyn NetworkConnectionInfoProvider>>Optional provider for GET /v1/network/connection_info (None in tests/WASM)
agent_service: Option<Arc<dyn AgentService + Send + Sync>>§analytics_service: Arc<dyn AnalyticsService + Send + Sync>§connectome_service: Arc<dyn ConnectomeService + Send + Sync>§genome_service: Arc<dyn GenomeService + Send + Sync>§neuron_service: Arc<dyn NeuronService + Send + Sync>§runtime_service: Arc<dyn RuntimeService + Send + Sync>§system_service: Arc<dyn SystemService + Send + Sync>§snapshot_service: Option<Arc<dyn SnapshotService + Send + Sync>>§feagi_session_timestamp: i64FEAGI session timestamp in milliseconds (Unix timestamp when FEAGI started) This is a unique identifier for each FEAGI instance/session
memory_stats_cache: Option<MemoryStatsCache>Memory area stats cache (updated by plasticity service, read by health check)
amalgamation_state: SharedAmalgamationStateIn-memory amalgamation state (pending request + history), surfaced via health_check.
genome_transition_lock: Arc<Mutex<()>>Exclusive lock for genome transition operations (load/upload/reload).
genome_transition_in_progress: Arc<AtomicBool>Indicates whether a prioritized genome transition is currently in progress.
agent_handler: Option<Arc<Mutex<FeagiAgentHandler>>>Agent handler for device registrations and transport management
Implementations§
Source§impl ApiState
impl ApiState
Sourcepub fn init_agent_registration_handler() -> Arc<Mutex<FeagiAgentHandler>>
pub fn init_agent_registration_handler() -> Arc<Mutex<FeagiAgentHandler>>
Initialize the agent handler (deprecated - use external initialization).
Sourcepub fn init_amalgamation_state() -> SharedAmalgamationState
pub fn init_amalgamation_state() -> SharedAmalgamationState
Initialize amalgamation_state field (empty state).
Sourcepub fn init_genome_transition_controls() -> (Arc<Mutex<()>>, Arc<AtomicBool>)
pub fn init_genome_transition_controls() -> (Arc<Mutex<()>>, Arc<AtomicBool>)
Initialize synchronization primitives for strict genome transitions.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ApiState
impl !RefUnwindSafe for ApiState
impl Send for ApiState
impl Sync for ApiState
impl Unpin for ApiState
impl UnsafeUnpin for ApiState
impl !UnwindSafe for ApiState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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