Function task_sender

Source
async fn task_sender(
    rx: Receiver<(u32, Task, bool)>,
    workers: Vec<WorkerSender<Result<Task, Status>>>,
    inter_client_interval: u64,
    inter_probe_interval: u64,
    number_of_probes: u8,
)
Expand description

Reads from a channel containing Tasks and sends them to the workers, at specified inter-client intervals. Sends repeated tasks (at inter-probe interval) if multiple probes per target are configured.

Used for starting a measurement, sending tasks to the workers, ending a measurement.

§Arguments

  • ‘rx’ - the channel containing the tuple (task_ID, task, multiple_times)

  • ‘workers’ - the list of worker senders to which the tasks will be sent

  • ‘inter_client_interval’ - the interval in seconds between sending tasks to different workers

  • ‘inter_probe_interval’ - the interval in seconds between sending multiple probes to the same worker

  • ‘number_of_probes’ - the number of times to probe the same target