PubSubx (pub_subx v0.1.0)

Documentation for PubSubx.

Link to this section Summary

Link to this section Types

@type process() :: atom() | pid()
@type topic() :: atom() | binary()

Link to this section Functions

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

publish(topic, message, name \\ __MODULE__)

@spec publish(topic(), term(), process()) :: :ok
Link to this function

start_link(opts \\ [])

@spec start_link(Keyword.t()) :: GenServer.on_start()
Link to this function

subscribe(topic, pid, name \\ __MODULE__)

@spec subscribe(topic(), process(), process()) :: :ok
Link to this function

subscribers(topic, name \\ __MODULE__)

@spec subscribers(topic(), process()) :: [pid()]
Link to this function

topics(name \\ __MODULE__)

@spec topics(process()) :: [topic()]
Link to this function

unsubscribe(topic, pid, name \\ __MODULE__)

@spec unsubscribe(topic(), process(), process()) :: :ok