Redix.PubSub.psubscribe
You're seeing just the function
psubscribe
, go back to Redix.PubSub module for more information.
Specs
psubscribe(connection(), String.t() | [String.t()], subscriber()) :: {:ok, reference()}
Subscribes subscriber
to the given pattern or list of patterns.
Works like subscribe/3
but subscribing subscriber
to a pattern (or list of
patterns) instead of regular channels.
Upon successful subscription to each of the patterns
, a message will be sent
to subscriber
with the following form:
{:redix_pubsub, pid, ^subscription_ref, :psubscribed, %{pattern: pattern}}
See the documentation for Redix.PubSub
for more information about the format
of messages.
Examples
iex> Redix.psubscribe(conn, "ba*", self())
:ok
iex> flush()
{:redix_pubsub, ^conn, ^subscription_ref, :psubscribe, %{pattern: "ba*"}}
:ok