Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AFFE318C01 for ; Mon, 5 Oct 2015 19:45:31 +0000 (UTC) Received: (qmail 65748 invoked by uid 500); 5 Oct 2015 19:45:28 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 65601 invoked by uid 500); 5 Oct 2015 19:45:28 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 65584 invoked by uid 99); 5 Oct 2015 19:45:28 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Oct 2015 19:45:28 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2208FE0252; Mon, 5 Oct 2015 19:45:27 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tonysun83@apache.org To: commits@couchdb.apache.org Date: Mon, 05 Oct 2015 19:45:29 -0000 Message-Id: <10f28f940e5b4f6891b4f7edaf85934e@git.apache.org> In-Reply-To: <3ca830a56d2b40959e26b7dd4120237d@git.apache.org> References: <3ca830a56d2b40959e26b7dd4120237d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/5] couchdb-mango git commit: Update to new couch_epi API 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 Authored: Mon Sep 28 09:53:20 2015 -0700 Committer: ILYA Khlopotov 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)}}.