Update to new couch_epi API
Project: http://git-wip-us.apache.org/repos/asf/couchdb-mango/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mango/commit/19184f3c Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mango/tree/19184f3c Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mango/diff/19184f3c Branch: refs/heads/2816-malformed-docs Commit: 19184f3c28cc23b880901b94fe7545428628bfd0 Parents: 9eb60e7 Author: ILYA Khlopotov <iil...@ca.ibm.com> Authored: Mon Sep 28 09:53:20 2015 -0700 Committer: ILYA Khlopotov <iil...@ca.ibm.com> Committed: Mon Sep 28 09:53:20 2015 -0700 ---------------------------------------------------------------------- src/mango_epi.erl | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ src/mango_sup.erl | 4 +--- 2 files changed, 49 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-mango/blob/19184f3c/src/mango_epi.erl ---------------------------------------------------------------------- diff --git a/src/mango_epi.erl b/src/mango_epi.erl new file mode 100644 index 0000000..1fcd05b --- /dev/null +++ b/src/mango_epi.erl @@ -0,0 +1,48 @@ +% 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(mango_epi). + +-behaviour(couch_epi_plugin). + +-export([ + app/0, + providers/0, + services/0, + data_subscriptions/0, + data_providers/0, + processes/0, + notify/3 +]). + +app() -> + mango. + +providers() -> + [ + {chttpd_handlers, mango_httpd_handlers} + ]. + +services() -> + []. + +data_subscriptions() -> + []. + +data_providers() -> + []. + +processes() -> + []. + +notify(_Key, _Old, _New) -> + ok. http://git-wip-us.apache.org/repos/asf/couchdb-mango/blob/19184f3c/src/mango_sup.erl ---------------------------------------------------------------------- diff --git a/src/mango_sup.erl b/src/mango_sup.erl index 7f4cd10..e7f014b 100644 --- a/src/mango_sup.erl +++ b/src/mango_sup.erl @@ -21,6 +21,4 @@ start_link(Args) -> supervisor:start_link({local,?MODULE}, ?MODULE, Args). init([]) -> - {ok, {{one_for_one, 3, 10}, [ - chttpd_handlers:provider(mango, mango_httpd_handlers) - ]}}. + {ok, {{one_for_one, 3, 10}, couch_epi:register_service(mango_epi)}}.