Phoenix.PubSub.Redis
The Supervisor for the Redis Phoenix.PubSub adapter
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,
options: [host: "192.168.1.100"]
next, add :eredis, and :poolboy to your deps:
defp deps do
[{:eredis, github: "wooga/eredis"},
{:poolboy, "~> 1.4.2"},
...]
end
finally, add :poolboy to your applications:
def application do
[mod: {MyApp, []},
applications: [..., :phoenix, :poolboy],
...]
end
name- The required name to register the PubSub processes, ie:MyApp.PubSubopts- The optional redis options:host- The redis-server host IP, defaults"127.0.0.1"port- The redis-server port, defaults6379password- The redis-server password, defaults""
Summary↑
| start_link(name, opts) |