pub struct AppState {
pub graph: Arc<RwLock<AeoGraph>>,
pub audit_client: Client,
}Expand description
Shared app state — a single graph protected by a RwLock so /ingest
can replace it atomically without blocking concurrent reads.
When built with the audit-stream feature (default), the state also
holds a reqwest::Client reused for governance-event emission. The
client itself is cheap; what matters is reusing connections so a
burst of ingests doesn’t open one TCP socket per emit.
Fields§
§graph: Arc<RwLock<AeoGraph>>The graph itself.
audit_client: ClientShared HTTP client for audit_stream::emit. Always present when
the feature is on, even if AUDIT_STREAM_URL is unset (in which
case emit no-ops without using it).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppState
impl !RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
impl !UnwindSafe for AppState
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