You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/11/23 19:39:25 UTC

[GitHub] iilyak closed pull request #1761: Fix couch_epi typespec for data provider

iilyak closed pull request #1761: Fix couch_epi typespec for data provider
URL: https://github.com/apache/couchdb/pull/1761
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/couch_epi/src/couch_epi.erl b/src/couch_epi/src/couch_epi.erl
index a9132998b5..2ce4592d29 100644
--- a/src/couch_epi/src/couch_epi.erl
+++ b/src/couch_epi/src/couch_epi.erl
@@ -58,8 +58,12 @@
 
 -type apply_opts() :: [apply_opt()].
 
+-type data_spec_opt()
+   :: {interval, pos_integer()}.
+
 -type data_spec()
-    :: {module, module()}
+    :: {static_module, module()}
+        | {callback_module, module()}
         | {priv_file, FileName :: string()}
         | {file, FileName :: string()}.
 
diff --git a/src/couch_epi/src/couch_epi_plugin.erl b/src/couch_epi/src/couch_epi_plugin.erl
index 133a0d2164..2cb1f3ebe3 100644
--- a/src/couch_epi/src/couch_epi_plugin.erl
+++ b/src/couch_epi/src/couch_epi_plugin.erl
@@ -43,7 +43,10 @@
 -callback providers() -> [{couch_epi:service_id(), module()}].
 -callback services() -> [{couch_epi:service_id(), module()}].
 -callback data_subscriptions() -> [{couch_epi:service_id(), couch_epi:key()}].
--callback data_providers() -> [{couch_epi:service_id(), couch_epi:data_spec()}].
+-callback data_providers() -> [
+    {couch_epi:key(), couch_epi:data_spec()}
+        | {couch_epi:key(), couch_epi:data_spec(), [couch_epi:data_spec_opt()]}
+].
 -callback processes() -> [{couch_epi:plugin_id(), [supervisor:child_spec()]}].
 -callback notify(Key :: term(), Old :: term(), New :: term()) -> ok.
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services