Skip to content

Instantly share code, notes, and snippets.

@javierg
Last active October 24, 2016 11:28
Show Gist options
  • Save javierg/7844385 to your computer and use it in GitHub Desktop.
Save javierg/7844385 to your computer and use it in GitHub Desktop.
Elixir CouchView from: http://pastebin.com/BEqKKH99#
defmodule CouchQuery do
use GenServer.Behaviour
def start_link() do
:gen_server.start_link(__MODULE__, [], [])
end
def set_timeout(pid, timeout) do
:gen_server.call(pid, {:set_timeout, timeout})
end
def prompt(pid, data) when is_list(data) do
:gen_server.call(pid, {:prompt, data})
end
def init([]) do
{:ok, nil}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment