Phoenix.PubSub.Redis
Phoenix PubSub adapter based on Redis.
To use Redis as your PubSub adapter, simply add it to your Endpoint's config:
config :my_app, MyApp.Endpiont,
pubsub: [adapter: Phoenix.PubSub.Redis,
host: "192.168.1.100"]
You will also need to add :phoenix_pubsub_redis to your deps:
defp deps do
[{:phoenix_pubsub_redis, "~> 0.1.0"}]
end
And also add :phoenix_pubsub_redis to your list of applications:
def application do
[mod: {MyApp, []},
applications: [..., :phoenix, :phoenix_pubsub_redis]]
end
Options
:url- The url to the redis server ie:redis://username:password@host:port:name- The required name to register the PubSub processes, ie:MyApp.PubSub:host- The redis-server host IP, defaults"127.0.0.1":port- The redis-server port, defaults6379:password- The redis-server password, defaults""
Summary↑
| start_link(name, opts) |