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:04:39 UTC
[1/2] couchdb-global-changes git commit: Update to new couch_epi API
Repository: couchdb-global-changes
Updated Branches:
refs/heads/master 16d0200bc -> 07097ce3e
Update to new couch_epi API
Project: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/commit/349b3079
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/tree/349b3079
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/diff/349b3079
Branch: refs/heads/master
Commit: 349b3079af9e3b1e752328abcc2cf92debbf8847
Parents: 16d0200
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Mon Sep 28 09:48:59 2015 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Mon Sep 28 09:48:59 2015 -0700
----------------------------------------------------------------------
src/global_changes_epi.erl | 51 +++++++++++++++++++++++++++++++++++++++++
src/global_changes_sup.erl | 7 ++----
2 files changed, 53 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/blob/349b3079/src/global_changes_epi.erl
----------------------------------------------------------------------
diff --git a/src/global_changes_epi.erl b/src/global_changes_epi.erl
new file mode 100644
index 0000000..5d8cbf9
--- /dev/null
+++ b/src/global_changes_epi.erl
@@ -0,0 +1,51 @@
+% 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(global_changes_epi).
+
+-behaviour(couch_epi_plugin).
+
+-export([
+ app/0,
+ providers/0,
+ services/0,
+ data_subscriptions/0,
+ data_providers/0,
+ processes/0,
+ notify/3
+]).
+
+app() ->
+ global_changes.
+
+providers() ->
+ [
+ {chttpd_handlers, global_changes_httpd_handlers}
+ ].
+
+
+services() ->
+ [
+ {global_changes, global_changes_plugin}
+ ].
+
+data_subscriptions() ->
+ [].
+
+data_providers() ->
+ [].
+
+processes() ->
+ [].
+
+notify(_Key, _Old, _New) ->
+ ok.
http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/blob/349b3079/src/global_changes_sup.erl
----------------------------------------------------------------------
diff --git a/src/global_changes_sup.erl b/src/global_changes_sup.erl
index aed424e..6e61595 100644
--- a/src/global_changes_sup.erl
+++ b/src/global_changes_sup.erl
@@ -24,10 +24,9 @@ start_link() ->
init([]) ->
- couch_epi:register_service(global_changes),
global_changes_config_listener:subscribe(),
{ok, {
- {one_for_one, 5, 10}, [
+ {one_for_one, 5, 10}, couch_epi:register_service(global_changes_epi) ++ [
{
global_changes_server,
{global_changes_server, start_link, []},
@@ -35,7 +34,5 @@ init([]) ->
5000,
worker,
[global_changes_server]
- },
- chttpd_handlers:provider(
- global_changes, global_changes_httpd_handlers)
+ }
]}}.
[2/2] couchdb-global-changes git commit: Pass supervisor's children
to couch_epi
Posted by rn...@apache.org.
Pass supervisor's children to couch_epi
Project: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/commit/07097ce3
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/tree/07097ce3
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/diff/07097ce3
Branch: refs/heads/master
Commit: 07097ce3e10e970e4f00d487baf75c782943c8f8
Parents: 349b307
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Tue Sep 29 13:05:05 2015 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Tue Sep 29 13:05:05 2015 -0700
----------------------------------------------------------------------
src/global_changes_sup.erl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-global-changes/blob/07097ce3/src/global_changes_sup.erl
----------------------------------------------------------------------
diff --git a/src/global_changes_sup.erl b/src/global_changes_sup.erl
index 6e61595..13394ea 100644
--- a/src/global_changes_sup.erl
+++ b/src/global_changes_sup.erl
@@ -26,7 +26,7 @@ start_link() ->
init([]) ->
global_changes_config_listener:subscribe(),
{ok, {
- {one_for_one, 5, 10}, couch_epi:register_service(global_changes_epi) ++ [
+ {one_for_one, 5, 10}, couch_epi:register_service(global_changes_epi, [
{
global_changes_server,
{global_changes_server, start_link, []},
@@ -35,4 +35,4 @@ init([]) ->
worker,
[global_changes_server]
}
- ]}}.
+ ])}}.