Skip to main content

report_loop

Function report_loop 

Source
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.