mem_evoq_registry (mem_evoq v0.1.1)

View Source

ETS-backed registry mapping store IDs to their per-store gen_server pids.

Owns a single named ETS table (mem_evoq_registry) so lookups are sub-microsecond from the adapter callbacks. Lives as a gen_server so the table survives supervisor restarts only if the registry itself does NOT restart (which is the right semantic — if the registry dies the whole adapter is unrecoverable).

Summary

Functions

code_change(Old, State, Extra)

handle_call(Req, From, State)

handle_cast(Msg, State)

handle_info(Info, State)

init(_)

list()

-spec list() -> [{atom(), pid()}].

lookup(StoreId)

-spec lookup(atom()) -> {ok, pid()} | {error, not_found}.

register(StoreId, Pid)

-spec register(atom(), pid()) -> ok.

start_link()

terminate(Reason, State)

unregister(StoreId)

-spec unregister(atom()) -> ok.