/riak_pg

Distributed process groups with riak_core.

Primary LanguageErlangApache License 2.0Apache-2.0

Riak PG

Overview

Distributed process groups with riak_core.

Usage

Join a process to a group (no need to pre-declare)

join(term(), pid()) -> ok | {error, timeout}.

What about removing?

leave(term(), pid()) -> ok | {error, timeout}.

You can delete process groups.

delete(term()) -> ok | {error, timeout}.

You can also return the members, local members or connected members of a group.

members(term()) -> {ok, list(pid()) | {error, timeout}.
local_members(term()) -> {ok, list(pid()) | {error, timeout}.
connected_members(term()) -> {ok, list(pid()) | {error, timeout}.

You can list the groups that have been created and currently have members.

groups() -> {ok, list(term())} | {error, timeout}

Copyright

Copyright (C) 2013 Christopher Meiklejohn