1
0
Fork 0
mirror of https://codeberg.org/icewind/prometheus-mdns-rs.git synced 2026-06-03 18:04:11 +02:00

change port to 80

This commit is contained in:
Taras Glek 2022-11-24 12:53:24 +00:00
commit a8df919ea7

View file

@ -68,12 +68,15 @@ async fn main() -> Result<(), main_error::MainError> {
if let (Some(addr), Some(hostname)) = (addr, hostname) { if let (Some(addr), Some(hostname)) = (addr, hostname) {
labels.insert("hostname".to_string(), hostname.to_string()); labels.insert("hostname".to_string(), hostname.to_string());
let addr = SocketAddr::new(addr.ip(), 80);
let service = Service { let service = Service {
labels, labels,
addr, addr,
last_seen: Instant::now(), last_seen: Instant::now(),
}; };
println!("adding {} {}", hostname, addr);
let start_count = services.len(); let start_count = services.len();
services.insert(service.addr, service); services.insert(service.addr, service);