pub struct AppState {
pub store: Arc<EventStore>,
pub auth_manager: Arc<AuthManager>,
pub tenant_manager: Arc<TenantManager>,
pub service_container: ServiceContainer,
pub role: AtomicNodeRole,
pub wal_shipper: Arc<RwLock<Option<Arc<WalShipper>>>>,
pub wal_receiver: Option<Arc<WalReceiver>>,
pub replication_port: u16,
pub cluster_manager: Option<Arc<ClusterManager>>,
pub geo_replication: Option<Arc<GeoReplicationManager>>,
}Expand description
Unified application state for all handlers
Fields§
§store: Arc<EventStore>§auth_manager: Arc<AuthManager>§tenant_manager: Arc<TenantManager>§service_container: ServiceContainerService container for paywall domain use cases (Creator, Article, Payment, etc.)
role: AtomicNodeRoleNode role for leader-follower replication (runtime-mutable for failover)
wal_shipper: Arc<RwLock<Option<Arc<WalShipper>>>>WAL shipper for replication status reporting (leader only). Wrapped in RwLock so a promoted follower can install a shipper at runtime.
wal_receiver: Option<Arc<WalReceiver>>WAL receiver for replication status reporting (follower only)
replication_port: u16Replication port used by the WAL shipper (needed for runtime promotion)
cluster_manager: Option<Arc<ClusterManager>>Cluster manager for multi-node consensus and membership (optional)
geo_replication: Option<Arc<GeoReplicationManager>>Geo-replication manager for cross-region replication (optional)
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
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