Skip to main content

spawn_cloud_discovery

Function spawn_cloud_discovery 

Source
pub fn spawn_cloud_discovery() -> Option<Receiver<CloudInfo>>
Expand description

Spawn a background thread that probes cloud IMDS endpoints.

Call this before the warm-up sleep so probes run in parallel with the main thread’s warm-up (stateful collector priming + one interval sleep). Poll the returned Receiver with try_recv() after warm-up; if probes finished during the sleep the result is waiting immediately.

Returns None when no thread could be created (EAGAIN under PID limits); the caller should treat cloud info as permanently unavailable in that case.