INNER CODE UNIT · Rust

serve

deeplethe/forkd · crates/sandstorm-core/src/master/mod.rs:54

pub async fn serve(cfg: MasterConfig) -> Result<()> {
    let store = Store::open(&cfg.state_db)?;
    // Nothing has polled in yet, whatever the last run believed.
    let stale = store.mark_all_nodes_disconnected()?;
    if stale > 0 {
        tracing::info!(
            nodes = stale,
            "marked nodes disconnected pending their next poll"
        );
    }
    let ca = Ca::open_or_create(&cfg.pki_dir)?;
    if cfg.bind.ip().is_unspecified()
        && cfg.tls_sans.iter().all(|san| san.trim().is_empty())
        && !cfg.insecure_transport
    {
        tracing::warn!(
            bind = %cfg.bind,
            "the certificate names no address a client elsewhere can dial, so it \

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…