You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2015/10/01 17:07:16 UTC
[1/2] couch-index commit: updated refs/heads/master to 14f579d
Repository: couchdb-couch-index
Updated Branches:
refs/heads/master 6565cb961 -> 14f579dcd
Update to new couch_epi API
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/20ab254c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/tree/20ab254c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/diff/20ab254c
Branch: refs/heads/master
Commit: 20ab254c51652ef72e1e28b591b83a390da27f1d
Parents: 6565cb9
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Mon Sep 28 09:51:35 2015 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Mon Sep 28 09:51:35 2015 -0700
----------------------------------------------------------------------
src/couch_index_epi.erl | 49 +++++++++++++++++++++++++++++++++++++++++
src/couch_index_server.erl | 1 -
2 files changed, 49 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/blob/20ab254c/src/couch_index_epi.erl
----------------------------------------------------------------------
diff --git a/src/couch_index_epi.erl b/src/couch_index_epi.erl
new file mode 100644
index 0000000..946a590
--- /dev/null
+++ b/src/couch_index_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(couch_index_epi).
+
+-behaviour(couch_epi_plugin).
+
+-export([
+ app/0,
+ providers/0,
+ services/0,
+ data_subscriptions/0,
+ data_providers/0,
+ processes/0,
+ notify/3
+]).
+
+app() ->
+ couch_index.
+
+providers() ->
+ [].
+
+
+services() ->
+ [
+ {couch_index, couch_index_plugin}
+ ].
+
+data_subscriptions() ->
+ [].
+
+data_providers() ->
+ [].
+
+processes() ->
+ [].
+
+notify(_Key, _Old, _New) ->
+ ok.
http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/blob/20ab254c/src/couch_index_server.erl
----------------------------------------------------------------------
diff --git a/src/couch_index_server.erl b/src/couch_index_server.erl
index abb4b7a..ac2c609 100644
--- a/src/couch_index_server.erl
+++ b/src/couch_index_server.erl
@@ -38,7 +38,6 @@
-record(st, {root_dir}).
start_link() ->
- couch_epi:register_service(couch_index),
gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
[2/2] couch-index commit: updated refs/heads/master to 14f579d
Posted by rn...@apache.org.
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 <ii...@ca.ibm.com>
Authored: Tue Sep 29 13:18:21 2015 -0700
Committer: ILYA Khlopotov <ii...@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, [])}}.