barrel_vectordb_registry (barrel_vectordb v2.1.2)
View SourceLocal name registry for vector stores and their companions.
Names are arbitrary terms (in practice {vstore, NameBin} and friends), so dynamically named ephemeral stores never grow the atom table the way {local, Atom} registration does. Implements the {via, Module, Name} callbacks over a public ETS table; the owner process monitors registered pids and removes dead entries, so a crashed store never leaves a stale registration behind.
Summary
Functions
Start the registry if it is not running. Covers callers that start stores without the barrel_vectordb application (eunit, embedded use); under the application the supervisor owns it.
via callback: register Name to Pid. yes on success, no if the name is taken by a live process.
via callback.
via callback.
via callback: resolve Name to a live pid or undefined.
Functions
-spec ensure() -> ok.
Start the registry if it is not running. Covers callers that start stores without the barrel_vectordb application (eunit, embedded use); under the application the supervisor owns it.
via callback: register Name to Pid. yes on success, no if the name is taken by a live process.
via callback.
-spec unregister_name(term()) -> ok.
via callback.
via callback: resolve Name to a live pid or undefined.