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
HashMapwhose entries expire afterttl.