Procs
proc canStoreLocalRecord(kad: KadDHT; key: Key): bool {....raises: [], tags: [], forbids: [].}
- Source Edit
proc isExpired(record: EntryRecord; interval: chronos.Duration; currentUnixSeconds = nowUnixSeconds()): bool {....gcsafe, raises: [], tags: [TimeEffect, RootEffect, WriteIOEffect], forbids: [].}
- Returns true when the record's stored timestamp is older than interval. Records whose timestamp cannot be parsed are treated as expired. Source Edit
proc manageExpiredRecords(kad: KadDHT): InternalRaisesFuture[void, (CancelledError,)] {....stackTrace: false, raises: [], gcsafe, tags: [RootEffect], forbids: [].}
- Periodically scans dataTable and evicts entries that are older than config.recordExpirationInterval. Runs indefinitely as a heartbeat loop until cancelled (e.g. via cancelSoon or cancelAndWait). Source Edit