em_pop_store — DETS-backed peer table persistence.
Provides open/close/save/load against a named DETS table. Called exclusively by em_pop_node.
One table per node, namedem_pop_<agent_name>.
File: <persist_dir>/em_pop_<agent_name>.peers.
| close/1 | Close the DETS table. |
| load/1 | Read all saved peers back as a map. |
| open/2 | Open (or create) the DETS table. |
| save/2 | Replace the entire table with the current peer map. |
close(Name::atom()) -> ok | {error, term()}
Close the DETS table.
Errors (e.g. already closed) are returned as-is; callers may ignore.load(Name::atom()) -> #{binary() => term()}
Read all saved peers back as a map.
Returns #{} on any error so the caller never needs to handle failure.
Note:last_seen values in restored #peer{} records are monotonic
timestamps from a previous VM session and must be reset by the
caller after loading to prevent immediate stale eviction.
open(Name::atom(), Dir::string()) -> {ok, atom()} | {error, term()}
Open (or create) the DETS table.
Name — unique atom per node, e.g.em_pop_hackernews_filter
Dir — directory path string; created automatically if absent
save(Name::atom(), Peers::#{binary() => term()}) -> ok | {error, term()}
Replace the entire table with the current peer map.
Peers is #{PeerId => #peer{}} — the internal em_pop_node peer map.Generated by EDoc