use crate::prelude::*;
+// For clients only, really.
pub struct Reporter<'r> {
ic: &'r InstanceConfig,
successes: u64,
let now = Instant::now();
if let Some(rep) = &self.last_report {
if now - rep.when < match rep.ok {
- Ok(()) => Duration::from_secs(3600), // xxx config?
- Err(()) => Duration::from_secs(30), // xxx config?
+ Ok(()) => match self.ic.success_report_interval {
+ z if z == Duration::default() => return,
+ nonzero => nonzero,
+ },
+ Err(()) => self.ic.effective_http_timeout,
} {
return
}