wip(inventory-agent): local presence advertisement and discovery using mdns almost working
This commit is contained in:
16
harmony_inventory_agent/src/local_presence/mod.rs
Normal file
16
harmony_inventory_agent/src/local_presence/mod.rs
Normal 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,
|
||||
}
|
||||
Reference in New Issue
Block a user