wip(inventory-agent): local presence advertisement and discovery using mdns almost working

This commit is contained in:
2025-08-29 01:10:43 -04:00
parent 8cc7adf196
commit 6ac0e095a3
18 changed files with 624 additions and 63 deletions

View File

@@ -0,0 +1,16 @@
mod discover;
pub use discover::*;
mod advertise;
pub use advertise::*;
pub const SERVICE_NAME: &str = "_harmony._tcp.local.";
const VERSION: &str = env!("CARGO_PKG_VERSION");
// A specific error type for our module enhances clarity and usability.
#[derive(thiserror::Error, Debug)]
pub enum PresenceError {
#[error("Failed to create mDNS daemon")]
DaemonCreationFailed(#[from] mdns_sd::Error),
#[error("The shutdown signal has already been sent")]
ShutdownFailed,
}