diff options
author | Joe <joe@ubuntu.localdomain> | 2010-02-22 12:19:15 -0800 |
---|---|---|
committer | Joe <joe@ubuntu.localdomain> | 2010-02-22 12:19:15 -0800 |
commit | 6fce297e9ff9f495b10281f2c5c78e6e0c2d48ad (patch) | |
tree | 42f34b519a411ce8f594a375d5be5c885ee37ed6 /src/dynomite_http.erl |
merge attempt #1
Diffstat (limited to 'src/dynomite_http.erl')
-rw-r--r-- | src/dynomite_http.erl | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/dynomite_http.erl b/src/dynomite_http.erl new file mode 100644 index 00000000..8b6f7fbb --- /dev/null +++ b/src/dynomite_http.erl @@ -0,0 +1,21 @@ +%%%------------------------------------------------------------------- +%%% File : dynomite_http.erl +%%% Author : Brad Anderson <brad@cloudant.com> +%%% Description : +%%% +%%% Created : 10 Jan 2010 by Brad Anderson <brad@cloudant.com> +%%%------------------------------------------------------------------- +-module(dynomite_http). +-author('Brad Anderson <brad@cloudant.com>'). + +-include("../couch/src/couch_db.hrl"). +-include_lib("eunit/include/eunit.hrl"). + +-export([handle_cluster_info/1]). + + +%% GET /_cluster +handle_cluster_info(#httpd{method='GET', path_parts=[_]}=Req) -> + ClusterInfo = [{<<"ping_node">>, ?l2b(atom_to_list(node()))}], + showroom_log:message(info, "Cluster Info: ~p", [ClusterInfo]), + couch_httpd:send_json(Req, {ClusterInfo}). |