BPXE.Channel (bpxe v0.4.0)

BPXE.Channel provides basic functionality similar to pub/sub. A process can join a channel and start receiving messages and calls, and can leave a channel.

At the moment, it follows syn's API closely but this might change in the future.

To list used channels, run mix bpxe.channel.list

Link to this section Summary

Link to this section Types

Specs

bad_pids() :: [pid()]

Specs

group() :: any()
Link to this type

intended_recipient_count()

Specs

intended_recipient_count() :: non_neg_integer()

Specs

replies() :: [{pid(), reply()}]

Specs

reply() :: any()

Link to this section Functions

Link to this function

get_members(name)

Specs

get_members(group()) :: [pid()]
Link to this function

join(name, pid \\ self())

Specs

join(group(), pid()) :: :ok
Link to this function

leave(name, pid \\ self())

Specs

leave(group(), pid()) :: :ok | {:error, :not_in_group}
Link to this macro

multi_call()

(macro)
Link to this function

multi_call(name, message, timeout \\ 5000)

Specs

multi_call(group(), any(), timeout()) :: {replies(), bad_pids()}
Link to this function

multi_call_reply(pid, reply)

Specs

multi_call_reply(pid(), any()) :: :ok
Link to this function

publish(name, message)

Specs

publish(group(), any()) :: {:ok, intended_recipient_count()}