Skip to main content

Module task_distributor

Module task_distributor 

Source

Structs§

TaskDistributorConfig

Enums§

DistributionStrategy
How tasks should be distributed to workers

Constants§

REPLY_GRACE_SECS 🔒
Grace period (seconds) after the hitlist is exhausted
STACK_HIGH_WATERMARK_SECS 🔒
Pause discovery when the deepest follow-up stack exceeds this many seconds of drain (at the probing rate)
STACK_LOW_WATERMARK_SECS 🔒
Resume discovery once the deepest follow-up stack drops below this many seconds of drain (at the probing rate)

Functions§

distribute_live_tasks
Live task distributor for feed-based measurements.
distribute_tasks
Task distributor. Spawns a background task that distributes tasks to workers according to the chosen strategy, handles cooldowns, and sends end/break signals.
finalize_measurement 🔒
Finalize a measurement once task distribution is done: send the end-of-measurement instruction to all workers (marking them finished), then wait for every worker to report back before the distributor task exits.
make_task 🔒
Build a Task from a raw address and the current distribution metadata. The worker sends the probe nprobes times (spaced by the measurement’s probe interval).
resolve_worker_sel 🔒
Resolve a live target’s worker_ids into a worker selection: empty selects any worker (round-robin), [ALL_WORKERS] selects all probing workers, and anything else is an explicit set of worker IDs (sorted, deduplicated, and filtered to probing workers).
send_staggered 🔒
Send an instruction to each listed worker, spaced by the inter-worker interval.
send_to_workers 🔒
Send an instruction to workers according to the specified parameters.