multiverses_pubsub v0.1.0 Multiverses.Phoenix.PubSub View Source

Implements the Multiverses pattern for Phoenix.PubSub.

Messages topics are sharded by postfixing the topic with a universe id. Processes in any given universe are then only capable of subscribing to messages sent within the same universe.

Usage

use Multiverses, with: Phoenix.PubSub

and in that module use the PubSub alias as if you had the alias Phoenix.PubSub directive.

To use with Phoenix.Presence, see: Using Multiverses with Phoenix Presence

Warning

This system should not be used in production to achieve sharding of communications channels.

Important

This does not shard across phoenix channels, as each channel will presumably already exist in the context of its own test shard and have requisite :"$callers" implemented by other functionality.

Link to this section Summary

Link to this section Functions

Link to this macro

broadcast(pubsub, topic, message, dispatcher \\ Phoenix.PubSub)

View Source (macro)
Link to this macro

broadcast!(pubsub, topic, message, dispatcher \\ Phoenix.PubSub)

View Source (macro)
Link to this macro

broadcast_from(pubsub, from, topic, message, dispatcher \\ Phoenix.PubSub)

View Source (macro)
Link to this macro

broadcast_from!(pubsub, from, topic, message, dispatcher \\ Phoenix.PubSub)

View Source (macro)
Link to this macro

child_spec(p1)

View Source (macro)

cloned from Phoenix.PubSub.child_spec/1

Link to this macro

direct_broadcast(node_name, pubsub, topic, message, dispatcher \\ Phoenix.PubSub)

View Source (macro)
Link to this macro

direct_broadcast!(node_name, pubsub, topic, message, dispatcher \\ Phoenix.PubSub)

View Source (macro)
Link to this macro

dispatch(p1, p2, p3)

View Source (macro)

cloned from Phoenix.PubSub.dispatch/3

Link to this macro

local_broadcast(pubsub, topic, message, dispatcher \\ Phoenix.PubSub)

View Source (macro)
Link to this macro

local_broadcast_from(pubsub, from, topic, message, dispatcher \\ Phoenix.PubSub)

View Source (macro)

cloned from Phoenix.PubSub.node_name/1

Link to this macro

subscribe(pubsub, topic, opts \\ [])

View Source (macro)
Link to this macro

universal(message)

View Source (macro)
Link to this macro

unsubscribe(pubsub, topic)

View Source (macro)