Skip to main content

probe_hosts_parallel

Function probe_hosts_parallel 

Source
pub fn probe_hosts_parallel<F>(
    hosts: &[DiscoveredHost],
    timeout_secs: u64,
    on_progress: F,
) -> Vec<HostProbeResult>
where F: Fn(usize, usize, &str) + Send + Sync,
Expand description

Probe multiple hosts in parallel.

Uses rayon’s parallel iterator to probe hosts concurrently, calling the progress callback as each probe completes.

§Arguments

  • hosts - Slice of discovered hosts to probe
  • timeout_secs - Connection timeout per host
  • on_progress - Callback called after each host completes: (completed, total, host_name)

§Returns

Vector of probe results for all hosts.