couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject couchdb-global-changes git commit: Use dynamic handlers for `_db_updates`
Date Tue, 21 Jul 2015 13:16:44 GMT
Repository: couchdb-global-changes
Updated Branches:
  refs/heads/master d9f480321 -> ccf500c56


Use dynamic handlers for `_db_updates`


Project: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/commit/ccf500c5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/tree/ccf500c5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/diff/ccf500c5

Branch: refs/heads/master
Commit: ccf500c566d7da24321a54bf273d100f01da257a
Parents: d9f4803
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Wed Jul 15 08:47:59 2015 -0700
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Fri Jul 17 10:13:55 2015 -0700

----------------------------------------------------------------------
 src/global_changes.app.src            |  1 +
 src/global_changes_httpd_handlers.erl | 22 ++++++++++++++++++++++
 src/global_changes_sup.erl            |  4 +++-
 3 files changed, 26 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/blob/ccf500c5/src/global_changes.app.src
----------------------------------------------------------------------
diff --git a/src/global_changes.app.src b/src/global_changes.app.src
index 63456d2..a1dc2f3 100644
--- a/src/global_changes.app.src
+++ b/src/global_changes.app.src
@@ -17,6 +17,7 @@
     {applications, [
         kernel,
         stdlib,
+        couch_epi,
         config,
         couch_log,
         couch_stats,

http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/blob/ccf500c5/src/global_changes_httpd_handlers.erl
----------------------------------------------------------------------
diff --git a/src/global_changes_httpd_handlers.erl b/src/global_changes_httpd_handlers.erl
new file mode 100644
index 0000000..b21a64b
--- /dev/null
+++ b/src/global_changes_httpd_handlers.erl
@@ -0,0 +1,22 @@
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License.  You may obtain a copy of
+% the License at
+%
+%   http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+-module(global_changes_httpd_handlers).
+
+-export([url_handler/1, db_handler/1, design_handler/1]).
+
+url_handler(<<"_db_updates">>) -> fun global_changes_httpd:handle_global_changes_req/1;
+url_handler(_) -> no_match.
+
+db_handler(_) -> no_match.
+
+design_handler(_) -> no_match.

http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/blob/ccf500c5/src/global_changes_sup.erl
----------------------------------------------------------------------
diff --git a/src/global_changes_sup.erl b/src/global_changes_sup.erl
index debe64b..4d32f84 100644
--- a/src/global_changes_sup.erl
+++ b/src/global_changes_sup.erl
@@ -34,5 +34,7 @@ init([]) ->
                 5000,
                 worker,
                 [global_changes_server]
-            }
+            },
+            chttpd_handlers:provider(
+                global_changes, global_changes_httpd_handlers)
     ]}}.


Mime
View raw message