couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [1/4] mem3 commit: updated refs/heads/master to 62ac9b2
Date Thu, 01 Oct 2015 15:21:10 GMT
Repository: couchdb-mem3
Updated Branches:
  refs/heads/master 07c865611 -> 62ac9b265


Update to new couch_epi API


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

Branch: refs/heads/master
Commit: ae6fe1522c5b0bfd9d7a3fd61713976b1b8a6a8b
Parents: 07c8656
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Mon Sep 28 10:28:45 2015 -0700
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Mon Sep 28 10:28:45 2015 -0700

----------------------------------------------------------------------
 src/mem3_epi.erl | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 src/mem3_sup.erl |  5 ++---
 2 files changed, 53 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/ae6fe152/src/mem3_epi.erl
----------------------------------------------------------------------
diff --git a/src/mem3_epi.erl b/src/mem3_epi.erl
new file mode 100644
index 0000000..5c9f04c
--- /dev/null
+++ b/src/mem3_epi.erl
@@ -0,0 +1,51 @@
+% 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(mem3_epi).
+
+-behaviour(couch_epi_plugins).
+
+-export([
+    app/0,
+    providers/0,
+    services/0,
+    data_subscriptions/0,
+    data_providers/0,
+    processes/0,
+    notify/3
+]).
+
+app() ->
+    mem3.
+
+providers() ->
+    [
+         {chttpd_handlers, mem3_httpd_handlers}
+    ].
+
+
+services() ->
+    [
+    ].
+
+data_subscriptions() ->
+    [].
+
+data_providers() ->
+    [].
+
+processes() ->
+    [].
+
+notify(_Key, _Old, _New) ->
+    ok.

http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/ae6fe152/src/mem3_sup.erl
----------------------------------------------------------------------
diff --git a/src/mem3_sup.erl b/src/mem3_sup.erl
index 915bee4..f99381e 100644
--- a/src/mem3_sup.erl
+++ b/src/mem3_sup.erl
@@ -18,13 +18,12 @@ start_link() ->
     supervisor:start_link({local, ?MODULE}, ?MODULE, []).
 
 init(_Args) ->
-    Children = [
+    Children = couch_epi:register_service(mem3_epi) ++ [
         child(mem3_events),
         child(mem3_nodes),
         child(mem3_sync_nodes), % Order important?
         child(mem3_sync),
-        child(mem3_shards),
-        chttpd_handlers:provider(mem3, mem3_httpd_handlers)
+        child(mem3_shards)
     ],
     {ok, {{one_for_one,10,1}, Children}}.
 


Mime
View raw message