withCleanupInterval function

Option withCleanupInterval(
  1. Duration interval
)

WithCleanupInterval set the clean up interval. During a clean up run peers that disconnected before the grace period are removed. If unset, the interval is set to half the grace period.

Implementation

Option withCleanupInterval(Duration interval) {
  return (PeerstoreManager m) {
    m._cleanupInterval = interval;
    return;
  };
}