Skip to main content

parse_worker

Function parse_worker 

Source
fn parse_worker(
    worker: &Value,
    worker_map: &BiHashMap<u32, String>,
) -> Option<Vec<u32>>
Expand description

Resolve a feed line’s worker value to the target’s worker_ids: "any" (round-robin, empty list) or "all" (broadcast, [ALL_WORKERS]) sentinels, or a worker ID, hostname, or glob (e.g. us-*) resolved via resolve_workers — a glob yields every matched worker (probed staggered by the worker interval). Returns None (skip the line) on an unknown worker or a glob that matched nothing.