pub struct VaultState { /* private fields */ }Expand description
Vault SSH certificate and signing state.
Implementations§
Source§impl VaultState
impl VaultState
pub fn cert_cache( &self, ) -> &HashMap<String, (Instant, CertStatus, Option<SystemTime>)>
pub fn cert_entry( &self, alias: &str, ) -> Option<&(Instant, CertStatus, Option<SystemTime>)>
pub fn has_cert(&self, alias: &str) -> bool
pub fn insert_cert( &mut self, alias: String, entry: (Instant, CertStatus, Option<SystemTime>), )
pub fn remove_cert(&mut self, alias: &str)
pub fn clear_cert_cache(&mut self)
pub fn is_cert_check_in_flight(&self, alias: &str) -> bool
pub fn take_cleanup_warning(&mut self) -> Option<String>
pub fn signing_cancel(&self) -> Option<&Arc<AtomicBool>>
pub fn is_signing(&self) -> bool
pub fn set_signing_cancel(&mut self, cancel: Arc<AtomicBool>)
pub fn clear_signing_cancel(&mut self)
pub fn set_sign_thread(&mut self, handle: JoinHandle<()>)
pub fn sign_in_flight(&self) -> &Arc<Mutex<HashSet<String>>>
pub fn pending_config_write(&self) -> bool
pub fn set_pending_config_write(&mut self, value: bool)
Sourcepub fn prune_orphans(&mut self, valid_aliases: &HashSet<&str>)
pub fn prune_orphans(&mut self, valid_aliases: &HashSet<&str>)
Drop cert-cache, in-flight check, and bulk-sign in-flight entries
whose alias is no longer in valid_aliases. Called from
App::reload_hosts after the new host list lands. Recovers from a
poisoned sign_in_flight mutex by reading the inner set: a
poisoned worker still owns live aliases that must not be wiped.
Sourcepub fn migrate_alias(&mut self, old: &str, new: &str)
pub fn migrate_alias(&mut self, old: &str, new: &str)
Move cert_checks_in_flight and sign_in_flight entries from
old to new. cert_cache is excluded by design: a host
rename invalidates the prior cert path, so the caller is
expected to refresh the cache rather than migrate the entry.
Recovers from a poisoned sign_in_flight mutex. No-op when
old == new.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VaultState
impl !RefUnwindSafe for VaultState
impl Send for VaultState
impl Sync for VaultState
impl Unpin for VaultState
impl UnsafeUnpin for VaultState
impl !UnwindSafe for VaultState
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> 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