couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [2/2] couch-index commit: updated refs/heads/master to 14f579d
Date Thu, 01 Oct 2015 15:07:17 GMT
Plug couch_epi using supervisor


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/commit/14f579dc
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/tree/14f579dc
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/diff/14f579dc

Branch: refs/heads/master
Commit: 14f579dcd142ee90300244c854b301bbd5c863ee
Parents: 20ab254
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Tue Sep 29 13:18:21 2015 -0700
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Tue Sep 29 13:18:21 2015 -0700

----------------------------------------------------------------------
 src/couch_index.app.src |  3 ++-
 src/couch_index_app.erl | 21 +++++++++++++++++++++
 src/couch_index_sup.erl | 24 ++++++++++++++++++++++++
 3 files changed, 47 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/blob/14f579dc/src/couch_index.app.src
----------------------------------------------------------------------
diff --git a/src/couch_index.app.src b/src/couch_index.app.src
index 594589d..fd523b2 100644
--- a/src/couch_index.app.src
+++ b/src/couch_index.app.src
@@ -18,5 +18,6 @@
         couch_index_server
     ]},
     {registered, [couch_index_server]},
-    {applications, [kernel, stdlib]}
+    {applications, [kernel, stdlib, couch_epi]},
+    {mod, {couch_index_app, []}}
 ]}.

http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/blob/14f579dc/src/couch_index_app.erl
----------------------------------------------------------------------
diff --git a/src/couch_index_app.erl b/src/couch_index_app.erl
new file mode 100644
index 0000000..bdf770c
--- /dev/null
+++ b/src/couch_index_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_index_app).
+-behaviour(application).
+-export([start/2, stop/1]).
+
+start(_Type, StartArgs) ->
+    couch_index_sup:start_link(StartArgs).
+
+stop(_State) ->
+    ok.

http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/blob/14f579dc/src/couch_index_sup.erl
----------------------------------------------------------------------
diff --git a/src/couch_index_sup.erl b/src/couch_index_sup.erl
new file mode 100644
index 0000000..2d4f671
--- /dev/null
+++ b/src/couch_index_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_index_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_index_epi, [])}}.


Mime
View raw message