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 E5F5618860 for ; Tue, 1 Mar 2016 20:00:38 +0000 (UTC) Received: (qmail 98857 invoked by uid 500); 1 Mar 2016 20:00:36 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 98139 invoked by uid 500); 1 Mar 2016 20:00:35 -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 96796 invoked by uid 99); 1 Mar 2016 20:00:35 -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; Tue, 01 Mar 2016 20:00:35 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0EC73E78B9; Tue, 1 Mar 2016 20:00:35 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: iilyak@apache.org To: commits@couchdb.apache.org Date: Tue, 01 Mar 2016 20:01:21 -0000 Message-Id: <10c3f9c0ebe24775ac92aeed32dd9141@git.apache.org> In-Reply-To: <9d99c62cf9534dc1a0ead1c806934ff6@git.apache.org> References: <9d99c62cf9534dc1a0ead1c806934ff6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [48/50] couch-httpd commit: updated refs/heads/split_out_httpd_stack to e44a372 Plug couch_epi Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-httpd/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-httpd/commit/b208d8e4 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-httpd/tree/b208d8e4 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-httpd/diff/b208d8e4 Branch: refs/heads/split_out_httpd_stack Commit: b208d8e4ab36fa94dccb086a0b52013cccaeb22c Parents: bdca56a Author: ILYA Khlopotov Authored: Tue Mar 1 08:30:11 2016 -0800 Committer: ILYA Khlopotov Committed: Tue Mar 1 08:35:10 2016 -0800 ---------------------------------------------------------------------- src/couch_httpd.app.src | 1 + src/couch_httpd_app.erl | 21 ++++++++++++++++++ src/couch_httpd_epi.erl | 53 ++++++++++++++++++++++++++++++++++++++++++++ src/couch_httpd_sup.erl | 24 ++++++++++++++++++++ 4 files changed, 99 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-couch-httpd/blob/b208d8e4/src/couch_httpd.app.src ---------------------------------------------------------------------- diff --git a/src/couch_httpd.app.src b/src/couch_httpd.app.src index e90e2ac..39d96af 100644 --- a/src/couch_httpd.app.src +++ b/src/couch_httpd.app.src @@ -27,5 +27,6 @@ config ]}, {included_applications, [mochiweb]}, + {mod, {couch_httpd_app, []}}, {env, []} ]}. http://git-wip-us.apache.org/repos/asf/couchdb-couch-httpd/blob/b208d8e4/src/couch_httpd_app.erl ---------------------------------------------------------------------- diff --git a/src/couch_httpd_app.erl b/src/couch_httpd_app.erl new file mode 100644 index 0000000..87c1bdb --- /dev/null +++ b/src/couch_httpd_app.erl @@ -0,0 +1,21 @@ +% 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(couch_httpd_app). +-behaviour(application). +-export([start/2, stop/1]). + +start(_Type, StartArgs) -> + couch_httpd_sup:start_link(StartArgs). + +stop(_State) -> + ok. http://git-wip-us.apache.org/repos/asf/couchdb-couch-httpd/blob/b208d8e4/src/couch_httpd_epi.erl ---------------------------------------------------------------------- diff --git a/src/couch_httpd_epi.erl b/src/couch_httpd_epi.erl new file mode 100644 index 0000000..02d7a8c --- /dev/null +++ b/src/couch_httpd_epi.erl @@ -0,0 +1,53 @@ +% 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(couch_httpd_epi). + +-behaviour(couch_epi_plugin). + +-export([ + app/0, + providers/0, + services/0, + data_subscriptions/0, + data_providers/0, + processes/0, + notify/3 +]). + +app() -> + couch_httpd. + +providers() -> + [ + ]. + + +services() -> + [ + {couch_httpd_auth, couch_httpd_auth_plugin}, + {couch_httpd_handlers, couch_httpd_handlers}, + {couch_httpd, couch_httpd_plugin} + ]. + +data_subscriptions() -> + []. + +data_providers() -> + []. + +processes() -> + []. + +notify(_Key, _Old, _New) -> + ok. http://git-wip-us.apache.org/repos/asf/couchdb-couch-httpd/blob/b208d8e4/src/couch_httpd_sup.erl ---------------------------------------------------------------------- diff --git a/src/couch_httpd_sup.erl b/src/couch_httpd_sup.erl new file mode 100644 index 0000000..df974fe --- /dev/null +++ b/src/couch_httpd_sup.erl @@ -0,0 +1,24 @@ +% 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(couch_httpd_sup). +-behaviour(supervisor). +-export([init/1]). + +-export([start_link/1]). + + +start_link(Args) -> + supervisor:start_link({local,?MODULE}, ?MODULE, Args). + +init([]) -> + {ok, {{one_for_one, 3, 10}, couch_epi:register_service(couch_httpd_epi, [])}}.