Skip to content

Local Process Registry: An ETS-backed process registry with an API that's a subset of https://github.com/ostinelli/syn

License

Notifications You must be signed in to change notification settings

marianoguerra/lpr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lpr: Local Process Registry

Library to have a local process registry.

Use

The API is a subset of the ostinelli/syn library.

{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

About

Local Process Registry: An ETS-backed process registry with an API that's a subset of https://github.com/ostinelli/syn

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages