Last active
October 24, 2016 11:28
-
-
Save javierg/7844385 to your computer and use it in GitHub Desktop.
Elixir CouchView from: http://pastebin.com/BEqKKH99#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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