Skip to content

Instantly share code, notes, and snippets.

@chrismccord
Created July 15, 2013 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrismccord/6000108 to your computer and use it in GitHub Desktop.
Save chrismccord/6000108 to your computer and use it in GitHub Desktop.
Wrap eredis connection
defmodule ERedis do
@name :eredis_connection
def start do
{:ok, pid} = :eredis.start_link
:global.register_name(@name, pid)
end
def connection do
:global.whereis_name(@name)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment