unifier-cli 0.3.0

Filesystem postbox for inter-process communication via a Unix tree
Documentation
//! Unix socket paths and daemon identity files.

use std::path::PathBuf;

use crate::home::UnifierHome;

const DAEMON_DIR: &str = ".daemon";

pub fn daemon_dir(home: &UnifierHome) -> PathBuf {
    home.path().join(DAEMON_DIR)
}

pub fn socket_path(home: &UnifierHome) -> PathBuf {
    daemon_dir(home).join("unifier.sock")
}

/// Outbound notices for mailbox/event wakeup (Jan cron listens here).
pub fn events_socket_path(home: &UnifierHome) -> PathBuf {
    daemon_dir(home).join("events.sock")
}

pub fn pid_path(home: &UnifierHome) -> PathBuf {
    daemon_dir(home).join("unifier.pid")
}