couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [1/2] couchdb-setup git commit: Update to new couch_epi API
Date Thu, 01 Oct 2015 15:05:18 GMT
Repository: couchdb-setup
Updated Branches:
  refs/heads/master 647ffbc4a -> d0a9b7224


Update to new couch_epi API


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

Branch: refs/heads/master
Commit: fb61c046649addb82ccb9fc9a3c4f56b5663e5f4
Parents: 647ffbc
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Mon Sep 28 10:30:26 2015 -0700
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Mon Sep 28 10:30:26 2015 -0700

----------------------------------------------------------------------
 src/setup_epi.erl | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 src/setup_sup.erl |  4 +---
 2 files changed, 50 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


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

http://git-wip-us.apache.org/repos/asf/couchdb-setup/blob/fb61c046/src/setup_sup.erl
----------------------------------------------------------------------
diff --git a/src/setup_sup.erl b/src/setup_sup.erl
index c86237d..d8b7008 100644
--- a/src/setup_sup.erl
+++ b/src/setup_sup.erl
@@ -35,6 +35,4 @@ start_link() ->
 %% ===================================================================
 
 init([]) ->
-    {ok, { {one_for_one, 5, 10}, [
-        chttpd_handlers:provider(setup, setup_httpd_handlers)
-    ]} }.
+    {ok, {{one_for_one, 5, 10}, couch_epi:register_service(setup_epi)}}.


Mime
View raw message