feat(inventory agent): Local presence advertisement and discovery now works! Must be within the same LAN to share the multicast address though
This commit is contained in:
@@ -8,9 +8,6 @@ use crate::hwinfo::PhysicalHost;
|
||||
mod hwinfo;
|
||||
mod local_presence;
|
||||
|
||||
|
||||
|
||||
|
||||
#[get("/inventory")]
|
||||
async fn inventory() -> impl Responder {
|
||||
log::info!("Received inventory request");
|
||||
@@ -32,7 +29,9 @@ async fn main() -> std::io::Result<()> {
|
||||
env_logger::init();
|
||||
|
||||
let port = env::var("HARMONY_INVENTORY_AGENT_PORT").unwrap_or_else(|_| "8080".to_string());
|
||||
let port = port.parse::<u16>().expect(&format!("Invalid port number, cannot parse to u16 {port}"));
|
||||
let port = port
|
||||
.parse::<u16>()
|
||||
.expect(&format!("Invalid port number, cannot parse to u16 {port}"));
|
||||
let bind_addr = format!("0.0.0.0:{}", port);
|
||||
|
||||
log::info!("Starting inventory agent on {}", bind_addr);
|
||||
|
||||
Reference in New Issue
Block a user