use std::collections::{HashMap, HashSet};
use std::sync::atomic::AtomicBool;
use std::sync::{Arc, Mutex};
pub struct VaultState {
pub cert_cache: HashMap<
String,
(
std::time::Instant,
crate::vault_ssh::CertStatus,
Option<std::time::SystemTime>,
),
>,
pub cert_checks_in_flight: HashSet<String>,
pub cleanup_warning: Option<String>,
pub signing_cancel: Option<Arc<AtomicBool>>,
pub sign_thread: Option<std::thread::JoinHandle<()>>,
pub sign_in_flight: Arc<Mutex<HashSet<String>>>,
}
impl Default for VaultState {
fn default() -> Self {
Self {
cert_cache: HashMap::new(),
cert_checks_in_flight: HashSet::new(),
cleanup_warning: None,
signing_cancel: None,
sign_thread: None,
sign_in_flight: Arc::new(Mutex::new(HashSet::new())),
}
}
}