pub struct AppState {
pub responder: Arc<ResponderState>,
pub live_signers: Arc<RwLock<HashMap<String, Arc<LiveSignerState>>>>,
pub signer: Option<Arc<SignerContext>>,
pub gossip: Option<Arc<GossipNode>>,
pub admin: Arc<AdminState>,
}Fields§
§responder: Arc<ResponderState>§live_signers: Arc<RwLock<HashMap<String, Arc<LiveSignerState>>>>§signer: Option<Arc<SignerContext>>§gossip: Option<Arc<GossipNode>>Handle to the running gossip node, when this process participates in the
SWIM mesh. None when gossip is disabled — admin fleet endpoints then
report an empty/disabled roster instead of members and generations.
admin: Arc<AdminState>Implementations§
Source§impl AppState
impl AppState
pub fn new(responder: ResponderState, config: Config) -> Self
Sourcepub fn with_live_signer(self, live: LiveSignerState) -> Self
pub fn with_live_signer(self, live: LiveSignerState) -> Self
Single-CA compatibility builder; never provides a cross-CA fallback.
pub fn with_live_signer_for(self, label: &str, live: LiveSignerState) -> Self
pub fn live_signer_for(&self, label: &str) -> Option<Arc<LiveSignerState>>
pub fn reload_live_signer(&self, ca: &CaConfig) -> Result<(), String>
Sourcepub fn with_signer_context(self, ctx: SignerContext) -> Self
pub fn with_signer_context(self, ctx: SignerContext) -> Self
Attach the shared on-demand signing context. The returned Arc is also
cloned into the background signer loop so both paths share one mutex.
Sourcepub fn with_gossip(self, gossip: Arc<GossipNode>) -> Self
pub fn with_gossip(self, gossip: Arc<GossipNode>) -> Self
Attach a handle to the running gossip node so admin fleet endpoints can read membership and the generation table, and so the signer path can announce new generations.
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