summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorILYA Khlopotov <iilyak@ca.ibm.com>2015-09-28 10:30:26 -0700
committerILYA Khlopotov <iilyak@ca.ibm.com>2015-09-28 10:30:26 -0700
commitfb61c046649addb82ccb9fc9a3c4f56b5663e5f4 (patch)
treeb0c8050f3071a2da1b06cfe62d46ecc0356a54d2
parent647ffbc4a1216239045af1e210863b9086f71cf4 (diff)
downloadcouchdb-fb61c046649addb82ccb9fc9a3c4f56b5663e5f4.tar.gz
Update to new couch_epi API
-rw-r--r--src/setup_epi.erl49
-rw-r--r--src/setup_sup.erl4
2 files changed, 50 insertions, 3 deletions
diff --git a/src/setup_epi.erl b/src/setup_epi.erl
new file mode 100644
index 000000000..c3f2636f0
--- /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.
diff --git a/src/setup_sup.erl b/src/setup_sup.erl
index c86237dfa..d8b700852 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)}}.