pub async fn report_loop(
client: Arc<CpClient>,
metrics: Arc<Metrics>,
interval: Duration,
shutdown: Receiver<bool>,
)Expand description
Background loop: flush the usage accumulator to the control plane each period. On a failed report the drained delta is added back so billable usage isn’t lost.