Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marianoguerra/lpr
Local Process Registry: An ETS-backed process registry with an API that's a subset of https://github.com/ostinelli/syn
https://github.com/marianoguerra/lpr
Last synced: about 1 month ago
JSON representation
Local Process Registry: An ETS-backed process registry with an API that's a subset of https://github.com/ostinelli/syn
- Host: GitHub
- URL: https://github.com/marianoguerra/lpr
- Owner: marianoguerra
- License: apache-2.0
- Created: 2019-11-14T09:45:51.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-14T18:17:02.000Z (about 5 years ago)
- Last Synced: 2024-09-20T00:45:03.421Z (about 2 months ago)
- Language: Erlang
- Size: 11.7 KB
- Stars: 7
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
lpr: Local Process Registry
===========================Library to have a local process registry.
Use
---The API is a subset of the [ostinelli/syn](https://github.com/ostinelli/syn) library.
```erlang
{ok, Ref} = lpr:start_link(),
ok = lpr:stop(Ref)ok = lpr:register(Ref, Key, Pid)
ok = lpr:register(Ref, Key, Pid, Meta)
{error, pid_already_registered} = lpr:register(Ref, Key, Pid)
{error, taken} = lpr:register(Ref, Key, Pid)ok = lpr:unregister(Ref, Key)
{error, undefined} = lpr:unregister(Ref, Key)Pid = lpr:find_by_key(Ref, Key)
{Pid, Meta} = lpr:find_by_key(Ref, Key, with_meta)Count = lpr:registry_count(Ref)
```Build
-----$ rebar3 compile
Test
----$ rebar3 test
License
-------Apache License 2.0
See LICENSE file for details
Author
------Mariano Guerra