pub struct AppState<E> {
pub engine: Arc<E>,
pub ingest_limits: IngestLimits,
pub ready: Arc<AtomicBool>,
pub stream: Arc<StreamHub>,
}Expand description
All-in-one single-process composition for a backend that serves every store capability. Split deployments construct the narrower capability states directly.
Fields§
§engine: Arc<E>Backend that implements every store capability.
ingest_limits: IngestLimitsLimits enforced by the ingest service before writing.
ready: Arc<AtomicBool>Gates ingest (writes) only. Query and compact remain available during drains so that in-flight reads can complete while the worker sheds write traffic.
stream: Arc<StreamHub>Shared fan-out hub for store.stream.v1.Subscribe.
Implementations§
Source§impl<E> AppState<E>where
E: StoreEngine,
impl<E> AppState<E>where
E: StoreEngine,
pub fn new(engine: Arc<E>) -> Self
pub fn with_ingest_limits(self, limits: IngestLimits) -> Self
Trait Implementations§
Source§impl<E> From<AppState<E>> for CompactState<E>
impl<E> From<AppState<E>> for CompactState<E>
Source§impl<E> From<AppState<E>> for IngestState<E>
impl<E> From<AppState<E>> for IngestState<E>
Source§impl<E> From<AppState<E>> for QueryState<E>
impl<E> From<AppState<E>> for QueryState<E>
Auto Trait Implementations§
impl<E> Freeze for AppState<E>
impl<E> RefUnwindSafe for AppState<E>where
E: RefUnwindSafe,
impl<E> Send for AppState<E>
impl<E> Sync for AppState<E>
impl<E> Unpin for AppState<E>
impl<E> UnsafeUnpin for AppState<E>
impl<E> UnwindSafe for AppState<E>where
E: RefUnwindSafe,
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