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. The read and administrative services 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 log.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 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>
Source§impl<E> From<AppState<E>> for PruneState<E>
impl<E> From<AppState<E>> for PruneState<E>
Source§impl<E> From<AppState<E>> for RetentionState<E>
impl<E> From<AppState<E>> for RetentionState<E>
Auto Trait Implementations§
impl<E> Freeze for AppState<E>
impl<E> RefUnwindSafe for AppState<E>where
Arc<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>where
Arc<E>: UnsafeUnpin,
impl<E> UnwindSafe for AppState<E>where
Arc<E>: UnwindSafe,
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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