Skip to main content

Module ttl_map

Module ttl_map 

Source
Expand description

A map whose entries expire after a configurable time-to-live.

Used by the registry to track pending replies, in-flight routed requests, and recently-seen event IDs (for mesh deduplication).

Expiry is lazy: the map has no background sweep task, so it introduces no runtime dependency. Entries are removed when get, has, or insert notices they are stale. An optional on_expire(key, value) callback fires at that moment.

Structsยง

TtlMap
A HashMap whose entries expire after ttl.